09-09-2020, 01:43 AM
Hi, guys! I have a very simple script for an item that lowers the character's skills when the item equipped and then returns them.
My question is this: when the item is equipped and the character's skill is lowered, the server allows it to be re-pumped. How can I stop this process and prevent players from pumping a reduced skill?
Code:
ONTRIGGER=EQUIP
if (<src.action>!=-1)
src.sysmessage You must wait to perform another action.
return 1
endif
if (<hitpoints>>50)&&(<morez>==0)
hitpoints=50
endif
if (<hitpoints> < 2)
src.sysmessage=Your <name> may have been destroer
remove
return 1
endif
if (<ATTR>&04)
ATTR=0
elseif (<ATTR>&04008)
ATTR=0
endif
if (rand(80)=6)
more=<more>+-1
if (<hitpoints> < 2)
src.sysmessage=Your <name> may have been destroer
remove
return 1
endif
endif
src.tactics=<src.tactics>+250
src.archery=<src.archery>+-100
src.fencing=<src.fencing>+-100
src.swordsmanship=<src.swordsmanship>+-100
src.macefighting=<src.macefighting>+-100
RETURN 0
ONTRIGGER=UNEQUIP
src.tactics=<src.tactics>+-250
src.archery=<src.archery>+100
src.fencing=<src.fencing>+100
src.swordsmanship=<src.swordsmanship>+100
src.macefighting=<src.macefighting>+100
RETURN 0
ONTRIGGER=SPELL
RETURN 1
ONTRIGGER=PICKUP_PACK
if (<hitpoints> < 2)
src.sysmessage=Your <name> may have been destroer
remove
return 1
endifMy question is this: when the item is equipped and the character's skill is lowered, the server allows it to be re-pumped. How can I stop this process and prevent players from pumping a reduced skill?