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

Solved Laver

Mr Zool

New Member
Joined
Jul 5, 2012
Messages
216
Reaction score
2
Can someone edit this script to create 2 gates ?
example :
gatepos = {x=512, y=467, z=7, stackpos=1}, {x=513, y=467, z=7, stackpos=1} ???
just 2 gates next to eachother

Code:
function onUse(cid, item, frompos, item2, topos)

gatepos = {x=512, y=467, z=7, stackpos=1}

getgate = getThingfromPos(gatepos)

if item.uid == 1503 and item.itemid == 1945 and getgate.itemid == 3687 then

doRemoveItem(getgate.uid,1)

doTransformItem(item.uid,item.itemid+1)

elseif item.uid == 1503 and item.itemid == 1946

and getgate.itemid == 0 then

doCreateItem(3687,1,gatepos)

doTransformItem(item.uid,item.itemid-1)

else

doPlayerSendCancel(cid,"Sorry, not possible.")

end

return 1

end

I need also script, cant find.
If "demodras" die, On "x,y,z" making id "429" - opened stairs for 60sec.
And there is broadcast "xxx player" killed demodras.
 
Code:
local gatepos = {
   {x=512, y=467, z=7},
   {x=513, y=467, z=7}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)

   if(getTileItemById(gatepos[1], 3687).uid > 0 and item.itemid == 1945) then
     for g = 1, #gatepos do
       doRemoveItem(getTileItemById(gatepos[g], 3687).uid,1)
     end
     doTransformItem(item.uid,item.itemid+1)
   elseif(getTileItemById(gatepos[1], 3687).uid < 1 and item.itemid == 1946) then
     for g = 1, #gatepos do
       doCreateItem(3687,1,gatepos[g])
     end
     doTransformItem(item.uid,item.itemid-1)
   else
     doPlayerSendCancel(cid,"Sorry, not possible.")
   end
   return true
end
 
Thank you.
STill need demodras script :
When someone kill demodras there is
-Broadcast "xx player just killed demodras"
-Way to quest "stairs id on xyz pos" only for 90 sec.

Can someone help me?
 
Code:
local config = {
     ["demodras"] = {time = 60, stairPos = {x = 100, y = 100, z = 7}, stairId = 429, groundId = 405}
}

local function removeStairs(pos, sId, gId)
     doTransformItem(getTileItemById(pos, sId).uid, gId)
     doSendMagicEffect(pos, CONST_ME_POFF)
     return true
end

function onKill(cid, target)
     local monster = config[getCreatureName(target):lower()]

     if(isPlayer(target) or not monster) then
       return true
     end
     doTransformItem(getTileItemById(monster.stairPos, monster.groundId).uid, monster.stairId)
     doBroadcastMessage(getPlayerName(cid).." just killed Demodras.")
     addEvent(removeStairs, monster.time * 1000, monster.stairPos, monster.stairId, monster.groundId)
     return true
end

Next time, post requests here
http://otland.net/forums/requests.132/
 
idk ... no error no anything =/


<event type="kill" name="Demodras" script="demodras.lua"/>

login register :
registerCreatureEvent(cid, "Demodras")


?????
 
Back
Top