Code Search for Developers
 
 
  

upgrade-notes-095.txt from POL-distro scripts at Krugle


Show upgrade-notes-095.txt syntax highlighted

POL095 Upgrade Notes
A Short List of changes you need to make before running your POL095 Server.

Please check the relevant core-changes text for full details.
---

EScript
---
Deprecated constructs will give compile warnings. Your script will still compile with them, but will not in POL096.
"local", "global", and "dim" are deprecated in favor of "var"
"begin" and "end" are deprecated, meaning the "do-while" loops are deprecated. Use "repeat-until" with reversed logic.
"=" should now be "=="
"account.SetAcctName()" should now be "account.SetName(name)"

"obj . ("member_name")" has been removed. use obj.get_member("member_name") and obj.set_member("member_name")


Script Data Structures
---
Structs:

You cannot access structs with array notation, i.e. struct_var[2]. You may have scripts that access members in this way. You must change it to access the members by name, i.e. struct_var.Member_Name or struct_var["Member_Name"]. Member names are case-insensative.

Dictionaries:

Checking if a key exists: if ( dict[key] == error ) now becomes: if ( dict.exists(key) )

Arrays:

In array declarations, it is illegal to have a trailing ",". For example: var b := array{1, 2, 3, }; will not compile.

Containers
---
Insert/Remove Scripts:
  Change the parameter lists for all your CanInsert and OnInsert scripts:
      where the 'program' directives used to look like this:
        program CanInsert( mob, container, adding_item )
        program OnInsert( mob, container, adding_item )
      they now look like this:
        program CanInsert( mob, container, movetype, inserttype, adding_item, existing_stack, amt_to_add );
        program OnInsert( mob, container, movetype, inserttype, added_item, existing_stack, amt_to_add );

    if you want a really easy conversion from POL092-style Can/OnInsert scripts, change the program directive and add
    this at the beginning of your 'program' section:
        if (inserttype != INSERT_ADD_ITEM)
            return 1;
        endif
        
  Change the parameter lists of CanRemove and OnRemove to:
  program can_remove(mob, container, item, movetype)
  program on_remove(mob, container, item, movetype)
  
  Script functions that add/move/delete items to/from containers will call that container's canInsert, onInsert, canRemove, and onRemove scripts (where appropriate, i.e. if MoveItemToContainer first moves an item out of the original container, caRemove and onRemove will be called). As always, if canInsert or canRemove returns 0, the function WILL FAIL to move/add/delete. ALWAYS check the return value of an core function for an error!
  
  Note 'mob' may be uninitialized in these scripts if a core function performed the item move and the container was not owned by any mobile.
  
  Constants for movetype and inserttype can be found in UO.EM.
  
  Note that OnInsert and OnRemove scripts are now run-to-completion (they used to be scheduled with other scripts).
  In particular, this means they can no longer sleep.
  
  The container limit defaults have been changed: Containers will default to limits as specified in servspecopt.cfg (if not defined, defaults: 150 items, 250 weight). MaxItems and MaxWeight properties in the container's itemdesc.cfg entry will override these defaults.


Config Files
---
You must add this to itemdesc.cfg:
        Container 0xFF02
        {
            Name        WornItemsContainer
            graphic     0x1E5E
            Gump        0x003C
            MinX        0
            MaxX        66
            MinY        0
            MaxY        33
            Weight      0
            MaxItems    65535
            Maxweight   65535
        }

Set Weapon 0xF020 to SaveOnExit 0.

xlate.cfg is no longer used, so any item "aliases" you may have (for example "gc" for "garlic") will no longer be converted to an objtype. In these cases, you must add an itemdesc.cfg entry for them.

The default last Skill ID is 49, and you must provide a skills.cfg entry for each skill ID. You can change the max skill id in uoclient.cfg, i.e. "MaxSkillID 48"


Compiling
---
ecompile.cfg makes compiling easier by defining the key paths to include files, .em files, etc. If you have problems with ecompile not finding include files, consider changing to the new include format, ' include ":pkgname:filename" '


NPC Ai Scripts
---
There is no longer a default range for EnableEvents. To make your NPCs respond to Speech events, add an appropriate range parameter to the EnableEvents calls for SYSEVENT_SPEECH.

.props text command
---
.props is no longer an internal text command. use this script to replace it:
        use uo;

        program dot_props( who )
            var what := Target( who );
            if (what)
                var names := what.propnames();
                if (names.size() != 0)
                    foreach propname in names
                        SendSysMessage( who, propname + ": " + what.getprop( propname ) );
                    endforeach
                else
                    SendSysMessage( who, "No properties." );
                endif
            endif

        endprogram




See more files for this project here

POL-distro scripts

The default distribution of scripts for the POL server project.

Project homepage: http://sourceforge.net/projects/pol-distro
Programming language(s): ASP,Pascal
License: other

  client/
    prof.txt
    readme.txt
  config/
    animxlate.cfg
    armrdesc.cfg
    armrzone.cfg
    bannedips.cfg
    boats.cfg
    bookstorage.cfg
    bowcraft.cfg
    circles.cfg
    cloths.cfg
    cmds.cfg
    colors.cfg
    combat.cfg
    console.cfg
    days.cfg
    equip.cfg
    equip2.cfg
    food.cfg
    golocs.cfg
    gzone.cfg
    innlocation.cfg
    insertsound.cfg
    itemdesc.cfg
    lootgroup.cfg
    menus.cfg
    movecost.cfg
    mrcspawn.cfg
    multis.cfg
    names.cfg
    nlootgroup.cfg
    npcdesc.cfg
    npcequip.cfg
    repsys.cfg
    servers.cfg
    servspecopt.cfg
    sets.cfg
    skills.cfg
    spawngroups.cfg
    spawnregions.cfg
    speechgroup.cfg
    spells.cfg
    stacking.cfg
    starteqp.cfg
    startloc.cfg
    teleporters.cfg
    use_stuff.cfg
    watch.cfg
    wepndesc.cfg
    xlate.cfg
  data/
    ds/
      spawnregion/
      sysbook/
        staticbooks.1.txt
    accounts.txt
    datastore.txt
    guilds.txt
    items.txt
    multis.txt
    npcequip.txt
    npcs.txt
    objects.txt
    pcequip.txt
    pcs.txt
    pol.txt
    resource.txt
    storage.txt
  dbghelp/
    dbghelp.dll
  devpkg/
    core95/
      ds1/
      ds2/
      pkginc/
      servperf/
      support/
      testscript/
      wwwdebug/
      wwwroot/
      pkg.cfg
    testfileaccess/
    testing/
      textcmd/
      floodthread.src
      pkg.cfg
  docs/
    basicem.html
    boatem.html
    builtintextcmds.html
    cfgfileem.html
    commands.txt
    configfiles.html
    datafileem.html
    escriptguide.html
    events.html
    fileem.html
    filenames.txt
    gumps.html
    httpem.html
    index.html
    mathem.html
    nodes.txt
    npcem.html
    objref.html
    osem.html
    performance.html
    picture_gump_finish_1.png
    polsysem.html
    privilages.html
    scripttypes.html
    unicodeem.html
    uoem.html
    utilem.html
  license/
    crypt/
  misc/
    world.dor.dat
  pkg/
    foundations/
    items/
    npcs/
    skills/
    systems/
    template/
    tools/
  regions/
    fish.cfg
    light.cfg
    ore.cfg
    regions.cfg
    resource.cfg
    weather.cfg
    wood.cfg
  scripts/
    ai/
    console/
    control/
    include/
    items/
    misc/
    textcmd/
    util/
    www/
    ECOMPILE.BAT
    NPCKeeper.src
    basic.em
    basicio.em
    boat.em
    boneControl.src
    cfgfile.em
    datafile.em
    devenv.bat
    doRes.src
    ecall.bat
    ecompile.cfg
    ecompile.cfg.example
    file.em
    http.em
    itemRes.src
    math.em
    npc.em
    os.em
    polsys.em
    start.src
    storageWipe.src
    unicode.em
    uo.em
    util.em
  bugs.txt
  changes.old
  core-changes-old.txt
  core-changes.txt
  core-docs.txt
  distro-changelog.txt
  grouped-core-changes095.txt
  howto-connect.txt
  pol.cfg
  readme.txt
  upgrade-notes-095.txt