• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

on the quest of the spider cult

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

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
 
Solution
I guess you'd just want to update the storage value each time you smash an egg.

Put this around line 19.
Lua:
local storage = getPlayerStorageValue(cid, 12652)
if storage >= 1 and storage <= 4 then
    setPlayerStorageValue(cid, 12652, storage + 1)
end
I guess you'd just want to update the storage value each time you smash an egg.

Put this around line 19.
Lua:
local storage = getPlayerStorageValue(cid, 12652)
if storage >= 1 and storage <= 4 then
    setPlayerStorageValue(cid, 12652, storage + 1)
end
 
Solution

Similar threads

Back
Top