Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Begin SlaughterfishClub
- short OnPCEquip
- long MyCondition
- short timer
- if ( OnPCEquip != 1 )
- return
- endif
- ;No sense in running the script every frame when item is equipped.
- ;Every five frames ought to be enough as it's still way less than a second
- set timer to ( timer + 1 )
- if ( timer < 5 )
- return
- endif
- set timer to 0
- ;When detecting condition of the item it is possible that item breaks
- ;so fast the script can't keep up. If this happens raise the number below
- setx MyCondition to xGetCondition
- if ( MyCondition <= 20 )
- Startscript "RemoveSlaughterfishClub" ;Removing the club through a separate script
- return
- Set PCEquip to 0
- endif
- ///////////////////////////////////////
- Begin RemoveSlaughterfishClub
- short timer
- set timer to ( timer + 1 )
- if ( timer < 2 )
- return
- endif
- set Timer to 0
- player->removeitem SlaughterfishClub 1
- Stopscript "RemoveSlaughterfishClub"
- end
Add Comment
Please, Sign In to add comment