Honestly, I don't know. Obviously something wacky is going on. You might want to post your full script here and/or gibberlings3.
I think I might have understood what the problem was, when I managed to get the folowing script working. There were many Continue()d blocks, and the same variable was set twice in the same script round. Now, the script restarts between the two blocks which SetGlobal("TUDrowItemChecking",...) Could that have caused problems?
The new script, which appears to be working (but it's not really easy to test that script; it triggers every hour and the probability that something gets destroyed every time is quite low), is (I've cut the central part, which is extremely long and all the same):
(I'm sorry for the comments being in Italian; I copied it from
NI, as the original .bafs are full of variables which are set in the .tp2, so they're not easy to follow)
IF
GlobalLT("DROWITEMCHECKDONE","GLOBAL",2)
THEN
RESPONSE #100
SetGlobal("DROWITEMCHECKDONE","GLOBAL",2)
Continue()
END
IF
Global("TUDrowTimReset","Global",2)
THEN
RESPONSE #100
SetGlobalTimer("TUDrowTimer","Global",ONE_HOUR)
Continue()
END
IF
GlobalGT("TUDrowTimReset","Global",0)
THEN
RESPONSE #100
SetGlobal("TUDrowTimReset","Global",0)
SetGlobal("TUDrowChecking","Global",0)
Continue()
END
IF
Global("TUDrowItems","Global",0)
OR(32)
PartyHasItem("DWCHAN01") // Cotta di Maglia Elfica Drow +3
PartyHasItem("DWCHAN02") // Cotta di Maglia di Adamantite Drow +3
PartyHasItem("DWSW1H01") // Scimitarra Drow +3
PartyHasItem("DWSW1H02") // Spada Lunga Drow +3
PartyHasItem("DWBLUN01") // Mazzafrusto Drow +3
PartyHasItem("DWHALB01") // Alabarda Drow +3
PartyHasItem("DWSPER01") // Lancia da Cavaliere Drow +3
PartyHasItem("DWXBOW01") // Balestra della Velocità Drow +3
PartyHasItem("DWSHLD01") // Scudo Drow +3
PartyHasItem("DWCLCK01") // Mantello Piwafwi Drow
PartyHasItem("DWBOLT01") // Dardo del Sonno Drow
PartyHasItem("DWBOLT02") // Dardo Stordente Drow
PartyHasItem("DWBOLT03") // Dardo Drow +1
PartyHasItem("DWPLAT01") // Corazza di Piastre Completa Drow +5
PartyHasItem("MISC9W") // Mantello Piwafwi Drow
PartyHasItem("DSDAGG03") // Pugnale +3 di Adamantite Drow
PartyHasItem("DSROBE05") // Abito del Mago Drow
PartyHasItem("sahbolt") // Quadrello Paralizzante
PartyHasItem("dw#dwkat")
PartyHasItem("chandrw")
PartyHasItem("sw1drw")
PartyHasItem("xbowdrw")
PartyHasItem("aaitm107")
PartyHasItem("drowchn1")
PartyHasItem("drowchn2")
PartyHasItem("drowchn3")
PartyHasItem("drowplt1")
PartyHasItem("drowplt2")
PartyHasItem("drowplt3")
PartyHasItem("drowshd1")
PartyHasItem("drowshd2")
PartyHasItem("drowshd3")
THEN
RESPONSE #100
SetGlobal("TUDrowItems","Global",1)
SetGlobalTimer("TUDrowTimer","Global",ONE_SECOND)
Continue()
END
IF
Global("TUDrowItems","Global",1)
Global("TUDrowChecking","Global",0)
GlobalTimerExpired("TUDrowTimer","Global")
THEN
RESPONSE #100
SetGlobal("TUDrowChecking","Global",1)
END
IF
Global("TUDrowChecking","Global",1)
TimeGT(DAWN_START)
TimeLT(DUSK_END)
!AreaType(DUNGEON)
OR(2)
!AreaType(OUTDOOR)
AreaType(DAYNIGHT)
THEN
RESPONSE #100
SetGlobal("TUDrowChecking","Global",2)
Continue()
END
Here there are many blocks like this one, but with different items and Players:
IF
Global("TUDrowChecking","Global",2)
HasItem("drowshd3",Player6)
!HasItemEquiped("CBDRWRNG",Player6) // Anello del Drow
THEN
RESPONSE #10
TakeItemReplace("DWDUST","drowshd3",Player6)
DisplayStringHead(Player6,138482) // Il tuo oggetto drow si è disintegrato
Continue()
RESPONSE #4
TakeItemReplace("DWDUST","drowshd3",Player6)
TakeItemReplace("DWDUST","drowshd3",Player6)
DisplayStringHead(Player6,138482) // Il tuo oggetto drow si è disintegrato
Continue()
RESPONSE #2
TakeItemReplace("DWDUST","drowshd3",Player6)
TakeItemReplace("DWDUST","drowshd3",Player6)
ActionOverride(Player6,DestroyItem("drowshd3"))
DisplayStringHead(Player6,138482) // Il tuo oggetto drow si è disintegrato
Continue()
RESPONSE #1
TakeItemReplace("DWDUST","drowshd3",Player6)
TakeItemReplace("DWDUST","drowshd3",Player6)
ActionOverride(Player6,DestroyItem("drowshd3"))
ActionOverride(Player6,DestroyItem("drowshd3"))
ActionOverride(Player6,DestroyItem("drowshd3"))
DisplayStringHead(Player6,138482) // Il tuo oggetto drow si è disintegrato
Continue()
RESPONSE #400
Continue()
END
And finally, there's this block:
IF
Global("TUDrowItems","Global",1)
!PartyHasItem("DWCHAN01") // Cotta di Maglia Elfica Drow +3
!PartyHasItem("DWCHAN02") // Cotta di Maglia di Adamantite Drow +3
!PartyHasItem("DWSW1H01") // Scimitarra Drow +3
!PartyHasItem("DWSW1H02") // Spada Lunga Drow +3
!PartyHasItem("DWBLUN01") // Mazzafrusto Drow +3
!PartyHasItem("DWHALB01") // Alabarda Drow +3
!PartyHasItem("DWSPER01") // Lancia da Cavaliere Drow +3
!PartyHasItem("DWXBOW01") // Balestra della Velocità Drow +3
!PartyHasItem("DWSHLD01") // Scudo Drow +3
!PartyHasItem("DWCLCK01") // Mantello Piwafwi Drow
!PartyHasItem("DWBOLT01") // Dardo del Sonno Drow
!PartyHasItem("DWBOLT02") // Dardo Stordente Drow
!PartyHasItem("DWBOLT03") // Dardo Drow +1
!PartyHasItem("DWPLAT01") // Corazza di Piastre Completa Drow +5
!PartyHasItem("MISC9W") // Mantello Piwafwi Drow
!PartyHasItem("DSDAGG03") // Pugnale +3 di Adamantite Drow
!PartyHasItem("DSROBE05") // Abito del Mago Drow
!PartyHasItem("sahbolt") // Quadrello Paralizzante
!PartyHasItem("dw#dwkat")
!PartyHasItem("chandrw")
!PartyHasItem("sw1drw")
!PartyHasItem("xbowdrw")
!PartyHasItem("aaitm107")
!PartyHasItem("drowchn1")
!PartyHasItem("drowchn2")
!PartyHasItem("drowchn3")
!PartyHasItem("drowplt1")
!PartyHasItem("drowplt2")
!PartyHasItem("drowplt3")
!PartyHasItem("drowshd1")
!PartyHasItem("drowshd2")
!PartyHasItem("drowshd3")
THEN
RESPONSE #100
SetGlobal("TUDrowItems","Global",0)
SetGlobal("TUDrowTimReset","Global",1)
END
IF
GlobalGT("TUDrowChecking","Global",0)
Global("TUDrowItems","Global",1)
THEN
RESPONSE #100
SetGlobal("TUDrowTimReset","Global",2)
END
Edited by Turambar, 03 November 2010 - 12:57 AM.