How can I make a table so that the storage reads me and as that storage comes out, such a monster as an example storage 1000 corresponds to the demodras with the position.
this script is pulling 100% but it only works for 1 storage and 1 monster how can I make a table and that each storage corresponds to x monster, I hope you can help me
UP!
UP!!
this script is pulling 100% but it only works for 1 storage and 1 monster how can I make a table and that each storage corresponds to x monster, I hope you can help me
Lua:
local t = {
storage = 3800,
monster = {"Demodras", {x=1056, y=940, z=7}},
}
function onStepIn(cid, item, position, lastPosition, fromPosition, toPosition, actor)
if(not isPlayer(cid)) then
return true
end
if getPlayerStorageValue(cid, t.storage) < 1 then
doCreatureSay(cid, t.msg, TALKTYPE_ORANGE_1)
doSummonCreature(t.monster[1], t.monster[2])
doTeleportThing(cid, fromPosition, true)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Necesitas el acceso, Termina tu task!.")
else
local destination = {x = 1057, y = 950, z = 7}
doTeleportThing(cid, destination, true)
setPlayerStorageValue(cid, t.storage, getPlayerStorageValue(cid, t.storage) - 1)
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "Si mueres o sales del room pierdes el acceso a entrar de nuevo!.")
end
return true
end
Post automatically merged:
UP!
Post automatically merged:
UP!!
Last edited: