equipment permissions

Content and general development discussion, including quest scripts and server code. TMW Classic is a project comprising the Legacy tmwAthena server & the designated improved engine server based on evolHercules.


Forum rules

This forum houses many years of development, tracing back to some of the earliest posts that exist on the board.

Its current use is for the continued development of the server and game it has always served: TMW Classic.

Post Reply
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

equipment permissions

Post by o11c »

I just noticed that the new script function "RequireStat" sometimes calls unequipbyid during an equip script.

This does NOT work - it leads to doubled bonuses and/or corruption.

Instead, schedule a timer with a delay of 0 that removes the item. If you first check that no such timer is already scheduled, it will DTRT if the player somehow has multiple restricted items equipped.

(also, it would be better to pass the bStr directly instead of passing a string)
Former programmer for the TMWA server.
User avatar
v0id
Novice
Novice
Posts: 196
Joined: 15 Sep 2009, 21:31
Location: Désolé, je ne loue pas.

Re: equipment permissions

Post by v0id »

This does NOT work - it leads to doubled bonuses and/or corruption
you can spot a doubled bonuses which is only temporary (in fact, it appears between 2 iterations of a loop).
So far I can say this works.
Instead, schedule a timer with a delay of 0 that removes the item. If you first check that no such timer is already scheduled, it will DTRT if the player somehow has multiple restricted items equipped.
There are various timers available. And not everything works in equip scripts. Need detail.
Otherwise I CWLK.
User avatar
o11c
Grand Knight
Grand Knight
Posts: 2262
Joined: 20 Feb 2011, 21:09
Location: ^ ^

Re: equipment permissions

Post by o11c »

v0id wrote: There are various timers available. And not everything works in equip scripts. Need detail.
Otherwise I CWLK.
CWLK = ?

I mean player-attached timers - in this case addtimer(). (areatimer is the other way of attaching a timer to a player)

(the only other timers are NPC timers - initnpctimer and family)
Former programmer for the TMWA server.
Post Reply