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!
after implementing this players on my world found a easily reproduced exploit in about 24 hours id like to report but not in the open so as to destroy where this may be working well in the community. Is this forum actively monitored and I cna do it here or would someone like a stab at fixing it by IM or email?
Posted by DM Mask at 2006-02-19 15:27:30 Voted 9.75 on 02/19/06
Well done, the one improvement I can think of(That hasn't been mentioned) would be to turn of Deity auto-equip, instead having it lower the ILR of the weapons your deity follows. I.E. you follow Mask, instead of equipping any longsword, The check is fudged, so that using deity weapon reduces the items ILR by 5(Mod Level Variable). so a lvl 4 rogue of mask, could in that instance use a lvl 9 Longsword or below, as opposed to ANY longsword(Without other restrictions.) _________________________ Itinerant Admin: RPGModding.com - Where Modders Muster.
Not compatible with 2.3 yet, I will add 2.3 compatibility in the future once 2.3 leaves BETA mode and goes full release (its still in ALPHA). Those levels you are referring to are a 2.3 feature.
Posted by Macros ( 66.69.xxx.xxx ) at 2005-08-12 19:02:05
Can you add a switch to implement PRC ECL levels? ECL levels are basicly 'racial' class levels, and thus should count towards total class level for ILR restrictions
Posted by Macros ( 66.69.xxx.xxx ) at 2005-08-12 19:02:05
Can you add a switch to implement PRC ECL levels? ECL levels are basicly 'racial' class levels, and thus should count towards total class level for ILR restrictions
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.
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.
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.
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.
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 ( 68.209.xxx.xxx ) at 2005-04-19 19: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 ( 68.209.xxx.xxx ) at 2005-04-19 19: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!
@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.
Posted by Reydragon ( 200.120.xxx.xxx ) at 2005-03-10 20:55:00
Hello, this script work in the world of lodor case of where ilr must be turn off?.
Greetings.
Posted by Shadow_Avenger ( 81.152.xxx.xxx ) at 2005-03-03 00:55:00
Nice, using a modified earlier version.
The delay command on the unequip was missing before, but i sorted that.
One note, it is still exploitable.
There is no way round this that I have found atm.
I would not expect many to findout how it is done, but some will.
I don't want to post the exploit for obvious reasons.
I would suggest you add script to onclient enter the runs the ilr based on client enter aswell, Then if a play has exploited, when they relogg, items are auto unequiped.
Posted by Anonymous ( 68.209.xxx.xxx ) at 2005-02-28 17:57:00
//EDITED TO CORRECT OVER RUNNING SCRIPT ON AMUNITION
//Also edited to make it work right
// BY:SCHWAGMASTER 02-23-05
const string ILR_VARIABLE_NAME = "ilr_custom_override";
const string ITEM_DEITY_NAME = "ilr_deity";
// A structure for passing data around the functions here.
struct itemRestriction{
// This determines whether the wielder is allowed to wield the item
// Values to use:
// -1 Item use forbidden by this test, stop further testing.
// 0 Item use allowed by this test, pass to next test.
// 1 Item use allowed by this test, stop further testing.
int nAllow;
// Message to send to the equipping PC. This is ignored if nAllow is 0.
string sMessage;
};
switch(Result.nAllow){
case -1: actionForceUnequipItem(oItem, oPC, (Result.sMessage != "" ? Result.sMessage : sDeity + " does not allow you to wield " + GetName(oItem)));
case 0: break;
case 1: if(Result.sMessage != "") SendMessageToPC(oPC, Result.sMessage);
return;
}
// Handle restriction by item level
Result = GetItemLevelRestriction(oItem, oPC);
switch(Result.nAllow){
case -1: actionForceUnequipItem(oItem, oPC, Result.sMessage);
case 0: break;
if (iGPValue > 4000000) iItemLevel = 40;
else if (iGPValue > 3800000) iItemLevel = 39;
else if (iGPValue > 3600000) iItemLevel = 38;
else if (iGPValue > 3400000) iItemLevel = 37;
else if (iGPValue > 3200000) iItemLevel = 36;
else if (iGPValue > 3000000) iItemLevel = 35;
else if (iGPValue > 2800000) iItemLevel = 34;
else if (iGPValue > 2600000) iItemLevel = 33;
else if (iGPValue > 2400000) iItemLevel = 32;
else if (iGPValue > 2200000) iItemLevel = 31;
else if (iGPValue > 2000000) iItemLevel = 30;
else if (iGPValue > 1800000) iItemLevel = 29;
else if (iGPValue > 1600000) iItemLevel = 28;
else if (iGPValue > 1400000) iItemLevel = 27;
else if (iGPValue > 1200000) iItemLevel = 26;
else if (iGPValue > 1000000) iItemLevel = 25;
else if (iGPValue > 750000) iItemLevel = 24;
else if (iGPValue > 500000) iItemLevel = 23;
else if (iGPValue > 250000) iItemLevel = 22;
else if (iGPValue > 130000) iItemLevel = 21;
else if (iGPValue > 109999) iItemLevel = 20;
else if (iGPValue > 89999) iItemLevel = 19;
else if (iGPValue > 74999) iItemLevel = 18;
else if (iGPValue > 64999) iItemLevel = 17;
else if (iGPValue > 49999) iItemLevel = 16;
else if (iGPValue > 39999) iItemLevel = 15;
else if (iGPValue > 34999) iItemLevel = 14;
else if (iGPValue > 29999) iItemLevel = 13;
else if (iGPValue > 24999) iItemLevel = 12;
else if (iGPValue > 18499) iItemLevel = 11;
else if (iGPValue > 14999) iItemLevel = 10;
else if (iGPValue > 11999) iItemLevel = 9;
else if (iGPValue > 8999) iItemLevel = 8;
else if (iGPValue > 6499) iItemLevel = 7;
else if (iGPValue > 4999) iItemLevel = 6;
else if (iGPValue > 3499) iItemLevel = 5;
else if (iGPValue > 2499) iItemLevel = 4;
else if (iGPValue > 1499) iItemLevel = 3;
else if (iGPValue > 999) iItemLevel = 2;
}
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));
Posted by Anonymous ( 68.209.xxx.xxx ) at 2005-02-28 17:52:00
hi ,
I've been using your script.
You may want to put
if(basitemarrow)return; or something
and just let bolts arrows and bullets go past the irl..
If not, your script gets called many times when the archers or slingers start running out of ammunition, and , when bio execute starts look thru inventory to equip them.
A lot of people will go thru and stack their arrows in stacks of 10 or so, heh amazing the holes people find. So they can bypass the irl. So I figured, they have to have passed ilr to use their weapon such as bow, xbow, sling etc. Just let the ammo go thru until a better fix is around.
You're right, you can send me the updated script if you want to contribute. I'm willing to put the bioware values back into the script and make an update.
I used the script, and one of my players noticed something odd. One piece of armour (which I had labelled as a level 10 item) was telling him he had to be level 11 to wear it. I checked the code, and the value was wrong. In fact, all of the values before level 21 are wrong. The value for level 11 should be 19500, not 18499. Here's what I posted to him on my forums in response to his irritation:
I didn't type in the number wrong. Apparently the script I got to replace Bioware's ILR has an error in it. I will check it out, and see what's going on.
I went through all of the values up to 21st level items, and I figured out what the script did wrong. There are two things, really. 1- Bioware's system works off odd values to start a new level for ILR. So, to be a 2nd level item, it needs to have a value of 1001 gp. The script looks for a value of > 999, which would include 1000, which is wrong. That, however, was not the problem for the +3 studded leather with bull strength. What happened there was they simply put in a very wrong value. I figure they just simply made a typo, or got sloppy in checking ILR levels.
The STRANGEST part of the script is that they got the first 20 levels wrong, and then did it right for levels 21+. Not that I've checked the values, but that they set it so 21st level is > 130000, instead of 129999. It's like 2 completely different people wrote the script, and didn't bother to check each other's values... or someone realized their mistake half way through, and was too lazy to go back and fix it (it only took me a minute or two to go through and retype the values... so they're even lazier programmers than I am, and that's saying something...) ;)
0.5 now added here, it prevents cheating, in the fact that it wont allow the bug by evergrey to work, but you can still equip an item visually, even though its abilities and properties do not affect the creature.
Posted by Evergrey ( 213.36.xxx.xxx ) at 2005-02-10 10:02:00
Nice script here, but you have the same problem that the one i sue for my module, players can cheat with this script...
I'll mail you the problem, maybe you will be able to find an issue.