This script uses valuebased ILR checking (which takes into account prc items), that can be overridden by usage of the 'ilr_custom_override' variable (integer) on an item. Additionally it allows for you to set a deity variable called 'ilr_deity' (string) so that only if the player has that Deity name in his deity field will he be able to equip the item. And lastly you can forbid by type of item versus deity as well (which you will need to script by hand) and i have included an example of forbidding short swords to akadi worshippers Note: you do NOT need to set the module to item level restrictions on, you just have to put this script in the onequip script event under module properties. Note: Version 0.6 available here now, please use this version over any older ones!
I got it. I was testing with plot flagged items. Even though the ILR works on biowares system with plot, the GP value returns 0. Pretty lame. All I did was add a seperate plot check, set the the plot false, check gold, set plot true, then continue, and all works well. Cheers.
Posted by silvercloud at 2005-05-0910:14:37
Hi Skylizzard, mayhaps this is something to share with the community? I'd be interested to see the code and maybe put it in an update.
Posted by skivvylizard at 2005-05-0909:31:39
I got it. I was testing with plot flagged items. Even though the ILR works on biowares system with plot, the GP value returns 0. Pretty lame. All I did was add a seperate plot check, set the the plot false, check gold, set plot true, then continue, and all works well. Cheers.
Posted by skivvylizard at 2005-05-0909:04:02
Doh, I meant equip, not unequip..Coffee has not set in yet..:)
Posted by skivvylizard at 2005-05-0908:07:18
Doh, I meant equip, not unequip..Coffee has not set in yet..:)
Posted by skivvylizard at 2005-05-0908:06:26
I am trying to use this system, looks like something I was tyring to do myself by hand. The problem is with a standard item that has an ILR of 21, the script is returning 0's for everything, therefore allowing an unequip. I verified this by putting in debug statements in the case 0 checks. Do I have to change anything in the default script for the item based unequip? It doesn't look like it from what I can see, but other surely know more that I do...:)
Posted by schwag at 2005-04-1919:11:00
@Hey man ;) Yea I know its in there twice. For some reason I couldn't get it to work unless ? Might have been what I had changed b4 I got down there ? Not sure man, But I'm digging on your work. Thanks again!
Posted by schwag at 2005-04-1919:10:00
@Hey man ;) Yea I know its in there twice. For some reason I couldn't get it to work unless ? Might have been what I had changed b4 I got down there ? Not sure man, But I'm digging on your work. Thanks again!
Posted by silvercloud at 2005-04-1407:13:00
0.6 now up, fixes: - Projectile problem - Gold value based on 2da (small change to values)
Posted by silvercloud at 2005-04-1405:42:00
@SCHWAGMASTER: you edited the unequip to fire twice, the nAllow automatically fires the forceunequip if the result is -1. so in your last bit of code which is this: * if (iItemLevel > iClassLevel) * { * Result.nAllow = -1; * Result.sMessage = "You are not high enough level to * equip " + GetName(oItem) + ", you must be at least * level: " + IntToString(iItemLevel) + "."; * SetCommandable(FALSE, oPC); * DelayCommand(0.3, SetCommandable(TRUE, oPC)); * * DelayCommand(0.7, AssignCommand(oPC, * ClearAllActions(TRUE))); * DelayCommand(1.0,AssignCommand(oPC, * ActionUnequipItem(oItem))); * } you first call the forceunquip (by nAllow -1) and then unequip again. It would be more efficient to just unequip multiple times in the forceunequip if you wanted to do that. Besides the whole commandable/clearallactions/etc. really doesnt help to prevent cheating.