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

Ayuda con Scrip

demon el maton

New Member
Joined
Jan 6, 2009
Messages
23
Reaction score
0
Holas!
bueno de este foro saque este scrip:
function onUse(cid, item, fromPosition, itemEx, toPosition)

-- Define positions.
local charPos = getCreaturePosition(cid)
local doorPos = getThingPos(item.uid)
local monkOne = {x = doorPos.x - 1, y = doorPos.y - 2, z = doorPos.z}
local monkTwo = {x = doorPos.x + 1, y = doorPos.y - 2, z = doorPos.z}
local checkPlayer = {x = doorPos.x, y = doorPos.y - 1, z = doorPos.z, stackpos = 253}
-- Define directions.
local newDir = 0
local oldDir = 2

-- Check where the player is located at.
if ( charPos.y == doorPos.y + 1 and charPos.z == doorPos.z ) then
-- Check if someone already uses the training booth.
if isPlayer(getThingfromPos(checkPlayer).uid) == TRUE then
doPlayerSendTextMessage(cid, 24, "Alguien ya esta utilizando este cuarto.")
doSendMagicEffect(getCreaturePos(cid), 49)
else
-- Teleport player.
doTeleportThing(cid, doorPos)
doMoveCreature(cid, newDir)
-- Summon training monks.
doSummonCreature("Training Monk", monkOne)
doSummonCreature("Training Monk", monkTwo)
end
else
-- Teleport player.
doTeleportThing(cid, doorPos)
doMoveCreature(cid, oldDir)
-- Remove training monks.
doRemoveCreature(getThingfromPos({x = monkOne.x, y = monkOne.y, z = monkOne.z, stackpos = 253}).uid)
doRemoveCreature(getThingfromPos({x = monkTwo.x, y = monkTwo.y, z = monkTwo.z, stackpos = 253}).uid)
-- Send magic effect.
doSendMagicEffect(monkOne, 49)
doSendMagicEffect(monkTwo, 49)
end
return TRUE

end

Funciona bn al darle "use" ala puerta sale los monk pero quiero saver si lo pueden modificar para que al entrar a la sala pase X minuto y lo manden para varios lados y desaparsquan los trainer gracias :p :thumbup:
 
Back
Top