POL Module Updater

This is where you can post about tools related specifically to the POL Server itself

Moderator: POL Developer

Danielle
Grandmaster Poster
Posts: 104
Joined: Tue Feb 07, 2006 3:32 pm
Location: Pittsburgh, Pennsylvania

POL Module Updater

Post by Danielle »

This program will update your POL scripts and includes to ensure that they are using the correct modules for the version of POL you are using. Useful if you are upgrading to POL 97 or just want to make sure your scripts are accurate.

Includes support for:
  • POL 95
  • POL 96
  • POL 97
    • 07-28 core
    • 08-30 core
    • 09-16 core
    • 10-18 core
    • ...and future versions. Just add the newly added/moved/changed function to the appropriate INI file in the appropriate section. It's pretty self-explanatory once you look at the INI files. You don't have to wait for me to update the program -which probably won't happen until 97 is finalized.
Note: If you have more than one space between the function name and the opening parenthesis, the function will not be recognized. Some examples, a dash denotes the space(s):
  • "Function(...)" -- OK
  • "Function-(...)" -- OK
  • "Function--(...)" -- NOT OK!!
  • "Function---(...)" -- NOT OK!!
[EDIT] The download has been updated to version 1.0.2.0 -- See below post for details![/EDIT]
Attachments
setup.zip
POL Module Updater setup.exe program

(zipped because .exe is not allowed)
(120.63 KiB) Downloaded 680 times
Last edited by Danielle on Wed Jan 17, 2007 9:53 pm, edited 5 times in total.
Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am
Location: Italy
Contact:

Post by Lagoon »

Tested the tool, it has some bugs which make me advice against the use of this version of the tool:

- the characters à, è, é, ì, ò, ù are trashed by the tool in all the scripts
- it does not put use os; if the script contains Sleep() and no other os functions
- is does not pt use uo; if the script contains polcore() and no other uo functions
Danielle
Grandmaster Poster
Posts: 104
Joined: Tue Feb 07, 2006 3:32 pm
Location: Pittsburgh, Pennsylvania

Post by Danielle »

Aside from your second issue (more on that below), both the other issues have been fixed. The download in the post above has been updated to version 1.0.1.0

The changelog:
POL Module Updater 1.0.1.0 -- Tuesday, July, 18, 2006

Changed: The program will now ignore commented text. This includes both line-level comments and block-level comments.

Fixed: The characters "à, è, é, ì, ò, ù" are now properly recognised and preserved.

Fixed: The program wasn't performing a case-insensitive search.
I could not reproduce the sleep issue. It worked perfectly for me. It could be releated to the case-sensitive bug.. were you using perhaps "Sleep", versus "sleep"? If so, it's fixed.
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Post by CWO »

Gotta say great prog Danielle :wink:
Lagoon
Grandmaster Poster
Posts: 118
Joined: Sun Mar 05, 2006 7:25 am
Location: Italy
Contact:

Post by Lagoon »

Danielle wrote:Aside from your second issue (more on that below), both the other issues have been fixed. The download in the post above has been updated to version 1.0.1.0

The changelog:
POL Module Updater 1.0.1.0 -- Tuesday, July, 18, 2006

Changed: The program will now ignore commented text. This includes both line-level comments and block-level comments.

Fixed: The characters "à, è, é, ì, ò, ù" are now properly recognised and preserved.

Fixed: The program wasn't performing a case-insensitive search.
I could not reproduce the sleep issue. It worked perfectly for me. It could be releated to the case-sensitive bug.. were you using perhaps "Sleep", versus "sleep"? If so, it's fixed.
Yes, I think it's because some scripts had Sleep() instead of sleep()
Thanx for the update ^_^
Danielle
Grandmaster Poster
Posts: 104
Joined: Tue Feb 07, 2006 3:32 pm
Location: Pittsburgh, Pennsylvania

Post by Danielle »

Thanks CWO, and you're welcome Lagoon.

Let me know if you (or anyone else) encounter any more issues.
qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm
Location: Poland

Post by qrak »

Still something is wrong. I've tried to convert pol96 modules to pol97 modules.

1. you forgot about start_script in pol97.ini
2. why that tool puts in my NPCKeeper.src seven modules: npc, polsys, math, util, basic, uo and cfgfile if only uo.em and os.em are needed?
3. Im using FindAccount in one script and updater don't see it and im getting error from the compiler.
4. One more example:

Code: Select all

use os;
use npc;
use basic;

program CanInsert(who, backpack, movetype, inserttype, item, existing_stack, amt_to_add);
set_critical(1);
  if(inserttype != INSERT_ADD_ITEM)
          return 0;
  endif
  return 0;
set_critical(0);
endprogram
Why npc module is here? Why uo.em isn't here if supposed to be?
I can give lot of more examples.
Danielle
Grandmaster Poster
Posts: 104
Joined: Tue Feb 07, 2006 3:32 pm
Location: Pittsburgh, Pennsylvania

Post by Danielle »

1. you forgot about start_script in pol97.ini
Feel free to add it. I did and i'll update the download soon. Thats why I used ini files.. so if pol is updated and new functions are added or old ones are moved the program could be quickly updated without me.
2. why that tool puts in my NPCKeeper.src seven modules: npc, polsys, math, util, basic, uo and cfgfile if only uo.em and os.em are needed?
I don't know without seeing the script.
3. Im using FindAccount in one script and updater don't see it and im getting error from the compiler.
I don't know without seeing the script, also whats the compiler error?
Why npc module is here? Why uo.em isn't here if supposed to be?
It's possible it picked up on the word "move" which is an npc.em function. It shouldn't do that though. Additionally, there are no uo.em functions in that script, so why do you think it should be in there?
qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm
Location: Poland

Post by qrak »

1. ok

2. NPCKeeper.src:

Code: Select all

use npc;
use polsys;
use math;
use util;
use basic;
use uo;
use cfgfile;
include "include/startEqp";
include "include/attributes";
include "include/vetement";
include "include/randName";
include "include/client";

var pncfg := ReadConfigFile("npcdesc");
var equipt;

program npckeep(who)
  SetObjProperty(who, "AiSerial", cint(who.serial));
  var colors := pncfg[who.npctemplate].colors;
  if(colors)
    colors := SplitWords(colors);
    var clr := Cint(colors[RandomInt(Len(colors)) + 1]);
    who.color := clr;
    SetObjProperty(who, "Color", clr);
  endif
  if(who.name["<escortee>"])
    var ttitle := "";
    case(randomint(20) + 1)
       0: ttitle := " the townsperson";           equipt := "peasant1";
       1: ttitle := " the townsperson";           equipt := "peasant1";
       2: ttitle := " the townsperson";           equipt := "peasant1";
       3: ttitle := " the townsperson";           equipt := "peasant1";
       4: ttitle := " the townsperson";           equipt := "peasant1";
       5: ttitle := " the townsperson";           equipt := "peasant1";
       6: ttitle := " the townsperson";           equipt := "peasant1";
       7: ttitle := "";                           equipt := "peasant1";
       8: ttitle := "";                           equipt := "peasant1";
       9: ttitle := "";                           equipt := "peasant1";
      10: ttitle := "";                           equipt := "peasant1";
      11: ttitle := "";                           equipt := "peasant1";
      12: ttitle := "";                           equipt := "peasant1";
      13: ttitle := " the mage";                  equipt := "Mage";
      14: ttitle := " the mage";                  equipt := "Mage";
      15: ttitle := " the mage";                  equipt := "Mage";
      16: ttitle := " the seeker of adventure";   equipt := "seeker";
      17: ttitle := " the seeker of adventure";   equipt := "seeker";
      18: ttitle := " the seeker of adventure";   equipt := "seeker";
      19: ttitle := " the noble";                 equipt := "peasant2";
      20: ttitle := " the noble";                 equipt := "peasant2";
    endcase
    pickdestination(who, equipt);
    case(randomint(2))
      0: who.graphic := 0x190;
         who.gender := 0;
         equipt := equipt + "M";
      1: who.graphic := 0x191;
         who.gender := 1;
         equipt := equipt + "F";
    endcase
    SetObjProperty(who, "Graphic", cint(who.graphic));
    SetName(who, RandomName(who));
    SetName(who, who.name + ttitle);
    if(equipt)
      Habille(who, equipt);
      EraseObjProperty(who, "Equipt");
      var lewtgroup := pncfg[who.npctemplate].lootgroup;
      if(lewtgroup)
        MakeLoot(who, cint(lewtgroup));
      endif
    endif
  elseif(who.name["<employee>"])
    var cost := 0;
    var ttitle := "";
    case(randomint(15) + 1)
       0: ttitle := " the fighter";   equipt := "Fighter1";   cost := 40;
       1: ttitle := " the fighter";   equipt := "Fighter1";   cost := 40;
       2: ttitle := " the thief";     equipt := "Thief";      cost := 50;
       3: ttitle := " the thief";     equipt := "Thief";      cost := 50;
       4: ttitle := " the mage";      equipt := "Mage";       cost := 70;
       5: ttitle := " the mage";      equipt := "Mage";       cost := 70;
       6: ttitle := " the paladin";   equipt := "Paladin";    cost := 80;
       7: ttitle := " the paladin";   equipt := "Paladin";    cost := 80;
       8: ttitle := " the fighter";   equipt := "Fighter2";   cost := 40;
       9: ttitle := " the fighter";   equipt := "Fighter2";   cost := 40;
      10: ttitle := " the fighter";   equipt := "Fighter3";   cost := 40;
      11: ttitle := " the fighter";   equipt := "Fighter3";   cost := 40;
      12: ttitle := " the fighter";   equipt := "Fighter4";   cost := 40;
      13: ttitle := " the fighter";   equipt := "Fighter4";   cost := 40;
      14: ttitle := " the beggar";    equipt := "Beggar";     cost := 30;
      15: ttitle := " the beggar";    equipt := "Beggar";     cost := 30;
    endcase
    SetObjProperty(who, "MerchantType", equipt);
    SetObjProperty(who, "HireCost", cint(cost));
    Adjustment(who, equipt);
    case(randomint(2))
      0: who.graphic := 0x190;
         who.gender := 0;
         equipt := equipt + "M";
      1: who.graphic := 0x191;
         who.gender := 1;
         equipt := equipt + "F";
    endcase
    SetObjProperty(who, "Graphic", cint(who.graphic));
    SetName(who, RandomName(who));
    SetName(who, who.name + ttitle);
    pncfg := ReadConfigFile("npcdesc");
    if(equipt)
      Habille(who, equipt);
      EraseObjProperty(who, "Equipt");
      var lewtgroup := pncfg[who.npctemplate].lootgroup;
      if(lewtgroup)
        MakeLoot(who, cint(lewtgroup));
      endif
    endif
  else
    pncfg := ReadConfigFile("npcdesc");
    equipt := GetObjProperty(who, "Equipt");
    var plec :=  GetObjProperty(who, "plec");
    if(equipt)
      if(who.graphic == 0x190)
        if(plec)
        case(plec)
         "M": who.graphic := 0x190;
             who.gender := 0;
             equipt := equipt + "M";
          "F": who.graphic := 0x191;
             who.gender := 1;
             equipt := equipt + "F";
        endcase
        else
        case(randomint(2))
          0: who.graphic := 0x190;
             who.gender := 0;
             equipt := equipt + "M";
          1: who.graphic := 0x191;
             who.gender := 1;
             equipt := equipt + "F";
        endcase
        endif
      endif
      SetObjProperty(who, "Graphic", cint(who.graphic));
      Habille(who, equipt);
      EraseObjProperty(who, "Equipt");
      var lewtgroup := pncfg[who.npctemplate].lootgroup;
      if(lewtgroup)
        MakeLoot(who, cint(lewtgroup));
      endif
    endif
    if(Cint(GetObjProperty(who, "rideable")))
    if(Cint(!GetObjProperty(who, "Decay")))
      SetObjProperty(who, "Decay", ReadGameClock());
      endif
    endif
    
    if(who.name["<random>"])
      SetName(who, RandomName(who));
      if(pncfg[who.npctemplate].title)
        var title := randomint(20);
        var ttitle := "";
        case(title)
          0: ttitle := "";
          1: ttitle := " the townsperson";
          2: ttitle := " the farmer";
          3: ttitle := " the sailor";
          4: ttitle := " the drunkard";
          5: ttitle := " the wanderer";
          6: ttitle := " the villager";
          7: ttitle := " the gypsie";
          8: ttitle := " the vagabond";
          9: ttitle := " the laborer";
          default: ttitle := "";
        endcase
        SetName(who, who.name + ttitle);
      endif
    elseif(who.name["<balron>"])
      case(randomint(3) + 1)
        1: SetName(who, "Potepiony Demon");
        2: SetName(who, "Zniwiarz Dusz");
        3: SetName(who, "Lord Zniszczenia");
      endcase
    
//
    // WOW GWYRM NAMES
    elseif(who.name["<gwyrm>"])
    case(randomint(3)+1)
    1: SetName(who, "Gwareous Wielki");
    2: SetName(who, "Erstatesorus Wielki");
    3: SetName(who, "Antero Wielki");
    endcase
    //
    // wow! new dragon names! H!O!T!
    elseif(who.name["<dragon>"])
    case(randomint(7) +1)
    1: SetName(who, "Sergto-nen");
    2: SetName(who, "Aresto-loferin");
    3: SetName(who, "Gernerlofiterofis");
    4: SetName(who, "Sunnero-is de Va");
    5: SetName(who, "El Supbero'd Armad");
    6: SetName(who, "Rtyios");
    7: SetName(who, "Gawelsorofis");
    endcase
    endif
  endif
  if(pncfg[who.npctemplate].ammotype)
    var ammotype := pncfg[who.npctemplate].ammotype;
    if(ammotype)
      var ammoamount := pncfg[who.npctemplate].ammoamount;
      if(!ammoamount)
        ammoamount := 30;
      endif
      var theammo := CreateItemInBackpack(who, ammotype, ammoamount);
      if(theammo.amount > ammoamount)
        SubtractAmount(theammo, (theammo.amount - ammoamount));
      endif
    endif
  endif
//moved out so all templates can use this
      if(pncfg[who.npctemplate].colorrange)
        var parms := splitwords(pncfg[who.npctemplate].colorrange);
        who.color := randomint(Cint(parms[2]) - Cint(parms[1]))+Cint(parms[1]);
      endif
      if(pncfg[who.npctemplate].mount)
        var mymount := CreateItemAtLocation(263,623,-1,0xf021,1, _DEFAULT_REALM);
        var mountparms := splitwords(pncfg[who.npctemplate].mount);
        mymount.graphic := Cint(mountparms[1]);
        mymount.color := Cint(mountparms[2]);
        EquipItem(who, mymount);
      endif

endprogram

function Adjustment(who, type)
  if(type == "Mage")
    SetBaseSkillBaseValue(who, SKILLID_MAGERY,          1000);
    SetBaseSkillBaseValue(who, SKILLID_EVALINT,         1000);
    SetBaseSkillBaseValue(who, SKILLID_MAGICRESISTANCE, 900);
    SetBaseSkillBaseValue(who, SKILLID_TACTICS,         700);
    SetBaseSkillBaseValue(who, SKILLID_WRESTLING,       700);
  elseif(type == "Thief")
    SetBaseSkillBaseValue(who, SKILLID_FENCING,         1000);
    SetBaseSkillBaseValue(who, SKILLID_MAGICRESISTANCE, 60);
    SetBaseSkillBaseValue(who, SKILLID_TACTICS,         80);
    SetBaseSkillBaseValue(who, SKILLID_ANATOMY,         600);
  elseif(type == "Paladin")
    SetBaseSkillBaseValue(who, SKILLID_MAGICRESISTANCE, 800);
    SetBaseSkillBaseValue(who, SKILLID_TACTICS,         1000);
    SetBaseSkillBaseValue(who, SKILLID_SWORDSMANSHIP,   1000);
    SetBaseSkillBaseValue(who, SKILLID_MACEFIGHTING,    1000);
    SetBaseSkillBaseValue(who, SKILLID_FENCING,         1000);
    SetBaseSkillBaseValue(who, SKILLID_WRESTLING,       900);
    SetBaseSkillBaseValue(who, SKILLID_ANATOMY,         1000);
  elseif((type == "Fighter1") || (type == "Fighter2") || (type == "Fighter3") || (type == "Fighter4"))
    SetBaseSkillBaseValue(who, SKILLID_MAGICRESISTANCE, 600);
    SetBaseSkillBaseValue(who, SKILLID_TACTICS,         900);
    SetBaseSkillBaseValue(who, SKILLID_SWORDSMANSHIP,   900);
    SetBaseSkillBaseValue(who, SKILLID_MACEFIGHTING,    900);
    SetBaseSkillBaseValue(who, SKILLID_FENCING,         900);
    SetBaseSkillBaseValue(who, SKILLID_WRESTLING,       900);
    SetBaseSkillBaseValue(who, SKILLID_ANATOMY,         900);
  endif
endfunction


function pickdestination(me, type)
  SetObjProperty(me, "Type", type);
  var destination, coords;
  if(type == "seeker")
    destination := "a dungeon";
    SetObjProperty(me, "Coords", "5120 0 6143 2303");
    SetObjProperty(me, "Dest", destination);
  elseif(type == "Mage")
    case(randomint(12) + 1)
       1: coords := "470 805 710 1020";    destination := "the city of Yew";
       2: coords := "1285 1512 1700 1785"; destination := "the city of Brittain";
       3: coords := "2815 605 3050 1005";  destination := "the city of Vesper";
       4: coords := "1790 2635 2090 2900"; destination := "the city of Trinsic";
       5: coords := "540 2110 685 2290";   destination := "the city of Skara Brae";
       6: coords := "2865 3335 3070 3520"; destination := "the city of Serpent's Hold";
       7: coords := "3590 2460 3704 2695"; destination := "the city of Ocllo";
       8: coords := "4375 1020 4498 1185"; destination := "the city of Moonglow";
       9: coords := "2400 370 2545 590";   destination := "the city of Minoc";
      10: coords := "3645 2050 3785 2300"; destination := "the city of Magincia";
      11: coords := "1300 1665 1515 3925"; destination := "the city of Jhelom";
      12: coords := "5120 0 5375 255";     destination := "the city of Wind";
    endcase
    SetObjProperty(me, "Coords", coords);
    SetObjProperty(me, "Dest", destination);
  else
    case(randomint(14) + 1)
       1: coords :=  "470 805 710 1020";   destination := "the city of Yew";
       2: coords := "1285 1512 1700 1785"; destination := "the city of Brittain";
       3: coords := "2815 605 3050 1005";  destination := "the city of Vesper";
       4: coords := "1790 2635 2090 2900"; destination := "the city of Trinsic";
       5: coords := "540 2110 685 2290";   destination := "the city of Skara Brae";
       6: coords := "2865 3335 3070 3520"; destination := "the city of Serpent's Hold";
       7: coords := "3590 2460 3704 2695"; destination := "the city of Ocllo";
       8: coords := "3635 1165 3815 1410"; destination := "the city of Nujel'm";
       9: coords := "4375 1020 4498 1185"; destination := "the city of Moonglow";
      10: coords := "2400 370 2545 590";   destination := "the city of Minoc";
      11: coords := "3645 2050 3785 2300"; destination := "the city of Magincia";
      12: coords := "1300 1665 1515 3925"; destination := "the city of Jhelom";
      13: coords := "2205 1110 2280 1245"; destination := "the city of Cove";
      14: coords := "2650 2070 2765 2265"; destination := "the city of Buccaneer's Den";
    endcase
    SetObjProperty(me, "Coords", coords);
    SetObjProperty(me, "Dest", destination);
  endif
endfunction
3. Im getting error in login.src because it uses uo.em and your tool didn't included it:

Code: Select all


*
 *   Author: Unreal (MontuZ@Gmail.com) April 28, 2006.
 *   Version: 1.0
 *   Core: 096
 *   Description: Auto Account Creator. Just like many of you know this is a RunUO/SphereServer
 *   feature and now a POL feature. What it does exactly is when a person trys to login with
 *   an unknown(non-existant) account. This script creates the account and logs them in.
 *   Bugs: There shouldn't be any, but you never really know. So if a bug does come up
 *   please send me an email or post on the forum where you got this(polserver.com)
 *
 */

use polsys;
use npc;
use os;
use basicio;
use basic;

include "include/settings";
include "include/accounts";

CONST OFFSET_ACCOUNT_NAME	:= 0x01;
CONST OFFSET_ACCOUNT_PASS	:= 0x1F;
CONST INFO_LEN			:= 30;

enum THEFT_LEVELS
	ACCT_NOT_EXIST		:= 0,
	ACCT_LOGIN_OKAY		:= 1,
	ACCT_LOGIN_FAIL		:= 2,
	ACCT_LOGIN_HACK		:= 3,
endenum

Program Install()
	Print( "INSTALLING: Auto Account/Theft Prevention PH..." );
	Return 1;
Endprogram

exported function LoginHook(who, byref packet)
	who := who; // Avoid compiler warnings.

	var username := Packet.GetString(OFFSET_ACCOUNT_NAME, INFO_LEN);
	var password := Packet.GetString(OFFSET_ACCOUNT_PASS, INFO_LEN);

	if ( !username )
		SysLog( "Account/GetString Error: "+username.errortext );
		return 0;
	elseif ( !password )
		SysLog( "Password/GetString Error: "+password.errortext );
		return 0;
	endif

	var theft_level := AcctHackChecks(username, password);
	case ( theft_level )
		ACCT_NOT_EXIST:	 // Account doesn't yet exist.
			break; 
		ACCT_LOGIN_OKAY: // Account credentials are valid.
			return 0;
			break;
		ACCT_LOGIN_FAIL: // Account credentials are invalid.
			return 0; 
			break;
		ACCT_LOGIN_HACK: // Too many invalid logins. Leave user hanging.
			return 1;
			break;
	endcase
	
	var settings := ACCT_GetSettingsCfgElem("Settings");
	if ( !settings.AllowAutoAccounts )
		// Automatic account creation is disabled.
		return 0;
	endif
	
	var account := CreateNewAccount(username, password, 0, settings.DefaultExpansion);
	// In theory this should only return an error saying "Invalid parameter type".
	// Should never return "Account already exists" because we already looked for the
	// account and let pol handle it. And when it does return "Invalid parameter type"
	// we don't have to worry, pol will do the right job for us and just say that account
	// does not exist.
	if ( account.errortext )
		SysLog("CreateAccount() Error: "+account.errortext);
		return 0;
	endif
		
	SysLog( "AutoAccount Created: "+username );

	return 0;

endfunction

function AcctHackChecks(username, password)
	/*
	 * This is just a little password protection, so someone doesn't go around
	 * trying to steal peoples accounts trying 100's of passwords. It doesn't
	 * really stop someone, but it slows them down a lot and may lead them off
	 * from trying to steal the account.
	 * This is currently UNTESTED, in theory it should work. Any problems, again
	 * please send me an email to MontuZ@Gmail.com or post on the polserver.com's
	 * forum.
	 *
	 */

	/*  [Password Protection]  */
	var account := FindAccount(username);
	if ( !account )
		// Account doesn't even exist.
		return ACCT_NOT_EXIST;
	elseif ( !account.CheckPassword(password) )
		var failed_login := account.GetProp("#FailedLogin");
		// First attempt at failing the password check.
		if ( !failed_login )
			account.SetProp( "#FailedLogin", {1, POLCore().systime});
			return ACCT_LOGIN_FAIL; // Let pol tell the user it's an incorrect password.
		else
			if ( failed_login[1] >= 5 && ( failed_login[2] >> POLCore().systime ) )
		  		// Incorrect password for the 5th time.
		 		// Leave the user hanging at login for the next 10 minutes.
		 		account.SetProp("#FailedLogin", {failed_login[1]+1, POLCore().systime+600});
		  		return ACCT_LOGIN_HACK; // Leave user hanging.
		 	
		 	elseif ( failed_login[1] >= 5 && ( failed_login[2] << POLCore().systime ) )
		  		// User attempted to login with the wrong password after 10 minutes.
		 		// Reset user's wait time.
		 		account.EraseProp("#FailedLogin");
		  		return ACCT_LOGIN_FAIL; // Let pol tell the user it's an incorrect password.
		 	
		 	elseif ( failed_login[1] << 5 )
		 		// Let pol tell user it's an incorrect password.
		  		account.SetProp("#FailedLogin", {failed_login[1]+1, POLCore().systime+10});
		  		return ACCT_LOGIN_FAIL;
		 	endif
		endif
	else
		// Passed password check, let user login.
		return ACCT_LOGIN_OKAY;
	endif
endfunction
It's possible it picked up on the word "move" which is an npc.em function. It shouldn't do that though. Additionally, there are no uo.em functions in that script, so why do you think it should be in there?
It should be here because constant "INSERT_ADD_ITEM" it's in uo.em
User avatar
CWO
POL Expert
Posts: 1159
Joined: Sat Feb 04, 2006 5:49 pm
Location: Chicago, IL USA

Post by CWO »

well, I already picked out cfgfile, basic, and util functions in there...

cfgfile - ReadConfigFile()
basic - CInt() (Although use basic is not actually needed, its proper and not hurting anything)
util - RandomInt()


the others I havent picked out but it might be in your includes. attributes.inc I know uses math so it could be coming from that. So basically dont assume much, your includes could be declaring all of these "use" (which I dont like about many of the includes I have) and having those functions without you even noticing it.
qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm
Location: Poland

Post by qrak »

Ok i think you're right. Thanks for that tool, it saves lot of time.
Anyway - constants handling by pol moduler would be nice. As you can see caninsert script doesn't use any uo.em function but uses constant insert_add_item.
Danielle
Grandmaster Poster
Posts: 104
Joined: Tue Feb 07, 2006 3:32 pm
Location: Pittsburgh, Pennsylvania

Post by Danielle »

Yes, as CWO pointed out it could be getting the functions from the included scripts.

And yes, you are right. The tool currently does not look for the "built-in" constants. I'll look into adding that feature.
Danielle
Grandmaster Poster
Posts: 104
Joined: Tue Feb 07, 2006 3:32 pm
Location: Pittsburgh, Pennsylvania

Post by Danielle »

I did not add the ability to look for constants yet, but did add all the missing functions (the recently added ones and "start_script").. aswell as tweak the comparison engine.

The changelog:
POL Module Updater 1.0.2.0 -- Friday, October, 20, 2006

Changed: Synched with the current release of pol 97; adding all new functions.

Fixed: Added "start_script" function - it was missing.

Fixed: Minor tweaks to the search engine. Should provide more accurate results.
qrak
Grandmaster Poster
Posts: 198
Joined: Sun Feb 05, 2006 4:35 pm
Location: Poland

Post by qrak »

That's cool. I've tested it. Now it's very nice. Thanks.
Althalus
New User
Posts: 12
Joined: Fri Feb 17, 2006 5:34 pm

Post by Althalus »

and what about MoveCharacterToLocation() function? It did't change it at all on my scripts.
Danielle
Grandmaster Poster
Posts: 104
Joined: Tue Feb 07, 2006 3:32 pm
Location: Pittsburgh, Pennsylvania

Post by Danielle »

That function was removed with POL 97. It is up to you to remove obsolete and depreciated functions. POL Module Updater will not take care of that for you.
core-changes.txt wrote:Removed : Removed depreciated UO.EM Function MoveCharacterToLocation(). Use
MoveObjectToLocation() now.
Barbeirosa

Post by Barbeirosa »

Isn't the word 'deprecated'
http://en.wikipedia.org/wiki/Deprecated

and NOT 'depreciated'?

http://en.wikipedia.org/wiki/Depreciated


And would it not be useful for this program, if it's gotta go digging through files anyway, if it were to first dig through the module files to find what functions DO exist, so that one does not need to maintain some separate list, when there's a convenient list already made? It seems terribly redundant for a program to need a manual list to be made when there's one already there.
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Post by Yukiko »

Barbeirosa what you are asking for would be a difficult thing.

Let me paint you a picture:

Sam writes a new function for his coolStuffformyshard.inc file. The new function is MoveCharacterToLocation. He writes this because he wants one to replace the old one deprecated by POL 0.97 changes. Now your new and improved version of Danielle's updater reports every call to Sam's new function as a non-valid call.

Oh and by the way there is already a neat little program that reports deprecated and undefined function calls, you'll find it right there in the scripts directory graciously provided by the POL developers. It's named eCompile.
Danielle
Grandmaster Poster
Posts: 104
Joined: Tue Feb 07, 2006 3:32 pm
Location: Pittsburgh, Pennsylvania

Post by Danielle »

Heh, first you poke fun at me for using the wrong terminoloy.. then you ask me to write a new feature in my program for you?

Regardless of your "tactics", I have to agree with Yukiko. The most I would consider doing is perhaps giving a quick pop-up during the update process saying such-and-such script is using an deprecated function. I don't however, have any plans to add such a feature in the near future.
User avatar
MontuZ
Forum Regular
Posts: 338
Joined: Fri Feb 10, 2006 8:08 am
Location: Myrtle Beach, South Carolina

Post by MontuZ »

Just got done using it a few days ago, it's extremely handy and a lot faster than doing it by hand. Thanks for that, lol.

Anyway, I had 1 problem with it, after it had finished and I went to compile all my scripts and noticed that it doesn't append the modules at the top of the file, like before any 'global' vars causing compiling to fail.

Thought I'd let you know and I haven't read any previous posts to see if anyone else had this problem, sorry if this has been covered.
xeon
Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy

Re: POL Module Updater

Post by xeon »

Sorry to up an old thread,
I'm willing to use this tool, there have been some release after the one attached in the first post?
Yukiko
Distro Developer
Posts: 2825
Joined: Thu Feb 02, 2006 1:41 pm
Location: San Antonio, Texas
Contact:

Re: POL Module Updater

Post by Yukiko »

Unfortunately, Danielle hasn't posted on the forums for quite a long time. Maybe send a PM to see if she has updated the file. PMs do generate an email and that might get a response.
Danielle
Grandmaster Poster
Posts: 104
Joined: Tue Feb 07, 2006 3:32 pm
Location: Pittsburgh, Pennsylvania

Re: POL Module Updater

Post by Danielle »

Sadly I don't even have the source code for this anymore, though if I do find it i'll post it here so someone else could update it if they want.

I haven't been involved with POL development for quite a few years now.
User avatar
AsYlum
Grandmaster Poster
Posts: 109
Joined: Sun Feb 05, 2006 5:24 am
Location: Poland

Re: POL Module Updater

Post by AsYlum »

Danielle wrote:Sadly I don't even have the source code for this anymore, though if I do find it i'll post it here so someone else could update it if they want.

I haven't been involved with POL development for quite a few years now.
If you don't mind we can actually decompile binary. It looks like .net framework VB app :)
xeon
Forum Regular
Posts: 338
Joined: Fri Oct 31, 2008 3:18 am
Location: Italy

Re: POL Module Updater

Post by xeon »

Source code would be great, I'm sure POL developers would gadly host it on their public subversion repository to further the development by the community :)
Post Reply