The Neca Admin
Titulo : Ing. Sistemas Computacionales Experiencia : Mapper Level : 3289 Edad : 33 Mensajes : 33
| Tema: [ACTIONS] Town Scroll (teleporta para ciudades) Sáb Ago 22, 2015 6:27 pm | |
| hola usuarios de tibianeca hoy les traigo el tele scroll, como su nombre lo indica te teleporta a un ciudad que esta previamente definida, claro que usuarios con pz no podran teleportase. es muy sencillo de usar a darle click a telescroll y si no tiene pz sera teleportado a una ciudad. instalacion: Nos vamos a: Data/actions/scriptscopiamos cualquier archivo y renombramos por scroll.lua y pegan esto dentro: - Código:
-
function onUse(cid, item, frompos, item2, topos) local config = { pz = false, -- false = não precisa estar em protect zone battle = true, -- true = não pode ter battle remover = true, -- true = remove o item } local cidade = getTownTemplePosition(getPlayerTown(cid)) local posicao = getCreaturePosition(cid) if config.pz == true and getTilePzInfo(posicao) == FALSE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT,"Você precisa estar em protection zone pra poder teleportar.") elseif config.battle == true and getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE then doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Você precisa estar sem battle pra poder teleportar.") else if config.remover == true then doRemoveItem(item.uid) end doSendMagicEffect(posicao, CONST_ME_POFF) doTeleportThing(cid, cidade) doSendMagicEffect(cidade, CONST_ME_TELEPORT) doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, "Voce foi teleportado e o town scroll destruido.") end return true end luego se van a: Data/actions/actions.xmly añaden esta tag: - Código:
-
<action itemid="xxxx" event="script" value="town scroll.lua"/> itemid=" xxxx" aqui usted coloca el item que será usado. | |
|