- Fórum
- OTServ
- Recursos
- Scripting
- Actions e Talkactions
- [Action] Teleporte Conforme O Level
SK
action
[Action] Teleporte Conforme O Level
Por SkyDangerous, 02 de nov. de 2011 em Actions e Talkactions
script
1
834
Por SkyDangerous, 02 de nov. de 2011 em Actions e Talkactions
info
Grupo: Lorde
Registrado: 17/01/09
Posts: 2.1k
Reputação: +395
Char no Tibia: Adra Sata
+1 Script
crie uma arquivo lua chamado random.lua
local sky = { pos = {{x = 1009,y = 1025,z=7},{x = 1009,y = 1026,z=7},{x = 1009,y = 1027,z=7},{x = 1009,y = 1028,z=7}}, level = {100,200,300,400}, fight = true, premium = true, remover = true } function onUse(cid, item, frompos, item2, topos) level = getPlayerLevel(cid) if (sky.fight == true) and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendTextMessage(cid,22,"Você Precisa estar sem battle para usar o item.") return FALSE elseif not isPremium(cid) and configs.premium then doPlayerSendCancel(cid, "Você precisa de premium account para usar o item.") return FALSE end if (level <= sky.level[1] ) and (sky.remover) then doRemoveItem(item.uid, 1) doTeleportThing(cid,sky.pos[1]) doSendMagicEffect(getPlayerPosition(cid), 10) doPlayerSendTextMessage(cid,22,"Voce foi teleportado para um lugar secreto.") elseif (level >= sky.level[1]) and (level < sky.level[2]) and (sky.remover) then doRemoveItem(item.uid, 1) doTeleportThing(cid,sky.pos[2]) doSendMagicEffect(getPlayerPosition(cid), 10) doPlayerSendTextMessage(cid,22,"Voce foi teleportado para um lugar secreto.") elseif (level >= sky.level[2]) and (level < sky.level[3]) and (sky.remover) then doRemoveItem(item.uid, 1) doTeleportThing(cid,sky.pos[3]) doSendMagicEffect(getPlayerPosition(cid), 10) doPlayerSendTextMessage(cid,22,"Voce foi teleportado para um lugar secreto.") elseif (level >= sky.level[4]) and (sky.remover) then doRemoveItem(item.uid, 1) doTeleportThing(cid,sky.pos[4]) doSendMagicEffect(getPlayerPosition(cid), 10) doPlayerSendTextMessage(cid,22,"Voce foi teleportado para um lugar secreto.") else doPlayerSendTextMessage(cid, 25, "Desculpa nao e possiver teleportar") end endna action.xml cola essa tag
Explicando o Script:
Aqui são as posições que sera teleportado
pos = {{x = 1009,y = 1025,z=7},{x = 1009,y = 1026,z=7},{x = 1009,y = 1027,z=7},{x = 1009,y = 1028,z=7}},Aqui são os levels que podem teleportar
level = {100,200,300,400},Se ele pode estar em battle (True = Ativo | False = Desativado)
Se ele pode estar premium (True = Ativo | False = Desativado)
Se ele irá remover o item ao usar (True = Ativo | False = Desativado)
Explore o script
, modifique do seu jeito.
Depois eu concerto o remover, esqueci dele
Agradecimentos:
Editado Novembro 2 por SkyDangerous