Postado Setembro 1, 2015 9 anos Basicamente seria um item a minha escolha que ao dar use nele o player e teleportado pra X lugar.Obrigado desde já! Descreva seus sonhos aqui.
Postado Setembro 1, 2015 9 anos Em "Data/actions/scripts", magicTeleport.lua: local t = { position = {x = 160, y = 54, z = 7}, -- Posição que o item irá teleportar. level = 50, -- Level necessário. battle = false, -- Pode usar em batalha. needpz = true, -- Só usar em zona de proteção. remove = true } function onUse(cid, item) if t.battle == false and getCreatureCondition(cid, CONDITION_INFIGHT) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você não pode teleportar em batalha.') and true end if t.needpz == true and not getTilePzInfo((getCreaturePosition(cid))) then return doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você não pode teleportar fora da zona de proteção.') and true end if getPlayerLevel(cid) >= t.level then doTeleportThing(cid, t.position) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE) else doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, 'Você precisa ser level '.. t.level ..' para teleportar.') return true end if t.remove == true then doRemoveItem(item.uid, 1) end return true end TAG: <action itemid="XXX" script="magicTeleport.lua"/> Não testei pq estou sem base, se der algum erro me avise . ➥ Regras | Seções OTServ | Seções BOT
Postado Setembro 2, 2015 9 anos Autor Chegar em casa eu testo, mas agradeço desde já! Descreva seus sonhos aqui.
Participe da conversa
Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.