• 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!

StepIn Uniqueid [Movements]

chackie

New Member
Joined
Nov 1, 2009
Messages
87
Reaction score
0
Code:
local t = {
    storage = 32001,
    monster = {"Black Dragon", {x=522, y=587, z=6}},
    msg = "Oh no Black Dragon! Watch out, you have to kill him to get out of here.."
}
function onStepIn(cid, item, position, fromPosition)
    if getPlayerStorageValue(cid, t.storage) < 1 then       
        doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
        doSummonCreature(t.monster[1], t.monster[2])
        setPlayerStorageValue(cid, t.storage, 1)
    end
    return TRUE
end

Code:
        <movevent type="StepIn" uniqueid="1234" event="script" value="monster.lua"/>

This is a script when you step on uniqueid: 1234 then the black dragon summons.. But the problem is... when The black dragon summon and steps on the uniqueid a black dragon summons again xD. How to fix that the black dragon get storage. or if it is easier you can put exhusted time.

rep!!
 
Here you go:
Lua:
local t = {
    storage = 32001,
    monster = {"Black Dragon", {x=522, y=587, z=6}},
    msg = "Oh no Black Dragon! Watch out, you have to kill him to get out of here.."
}
function onStepIn(cid, item, position, fromPosition)
if isPlayer(cid) then
   if getPlayerStorageValue(cid, t.storage) < 1 then       
      doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
      doSummonCreature(t.monster[1], t.monster[2])
      setPlayerStorageValue(cid, t.storage, 1)
   else
       doPlayerSendCancel(cid,"You have already killed the black dragon")
   end
   end
return true
end

I just added:
Lua:
if isPlayer(cid) then
:p
 
Back
Top