mimus
New Member
- Joined
- Mar 14, 2012
- Messages
- 168
- Reaction score
- 2
hello everyone!!! im working on the daniel steelsoul's quest of the spider cult, the thing is that i dont know how to make the questlog change to the next part of the mission when i broke the spider egg, i supose that i must make a counter but im not shure if must do it on the data or on the remeres, any help would be lovely!!!
this is my quest.xml
and here is my spider spideregg.lua
this is my quest.xml
XML:
<mission name="Against the Spider Cult" storageid="12652" startvalue="1" endvalue="6">
<missionstate id="1" description="Daniel Steelsoul in Edron wants you to infiltrate the Edron Orc Cave and destroy 4 Spider Eggs." />
<missionstate id="2" description="You destroyed 1 of 4 Spider Eggs in the Edron Orc Cave" />
<missionstate id="3" description="You destroyed 2 of 4 Spider Eggs in the Edron Orc Cave" />
<missionstate id="4" description="You destroyed 3 of 4 Spider Eggs in the Edron Orc Cave" />
<missionstate id="5" description="You destroyed all Spider Eggs in the Edron Orc Cave, report back to Daniel Steelsoul!" />
<missionstate id="6" description="You have completed the Quest!" />
</mission>
and here is my spider spideregg.lua
Lua:
function onUse(cid, item, frompos, item2, topos)
recentID = item.itemid
local function closeegg()
doTransformItem(getThingfromPos(frompos).uid, recentID)
return true
end
local rand, effect = math.random(1, 100), CONST_ME_TELEPORT
if((rand >= 50) and (rand < 83)) then
doSummonCreature("Spider", frompos)
elseif((rand >= 83) and (rand < 97)) then
doSummonCreature("Poison Spider", frompos)
elseif((rand >= 97) and (rand < 100)) then
doSummonCreature("Tarantula", frompos)
elseif(rand == 100) then
doSummonCreature("Giant Spider", frompos)
else
effect = CONST_ME_POFF
end
doTransformItem(item.uid, 7566)
doSendMagicEffect(frompos, effect)
addEvent(closeegg, 270000)
return true
end