Gente, esses Actions eu não peguei do Xtibia, peguei de um outro site.
Cataputa Lançadora de players:
Nome: Catapulta lançadora de players
Servidor Testado: The Forgotten Server [Golden Warrior]
Descrição: Uma simples catapulta que ao der use ela lança o player a 8 sqms, seguindo todos os sqms
Modo de Instalação: forme a catapulta apartir dos ids 5598~5601 e no ID 5601 ponha actionid 3568. Atenção: tem que ser posto sim no 5601 por que tem um check para esse item no script.
Imagem: http://img132.imageshack.us/img132/9...1252389uv7.gif
Nota: como vcs viram na imagem, o player foi lançado num lugar que não tem chão. Isso não é possivel, para se tornar possivel vc tem que por o ID 460 no lugar que vai ser lançado, caso contrario a action para e o player não avança.
Script:
Código:
function onUse(cid, item, frompos, item2, topos)if item.actionid == 3568 and item.itemid == 5601 then
mayNotMove(cid, 1)
param = {cid = cid, pos = pos, new = new}
addEvent(teleport1,100,param)
addEvent(teleport2,200,param)
addEvent(teleport3,300,param)
addEvent(teleport4,400,param)
addEvent(teleport5,500,param)
addEvent(teleport6,650,param)
addEvent(teleport7,750,param)
addEvent(teleport8,800,param)
end
end
function teleport1(param)
cid = param.cid
pos = getPlayerPosition(cid)
new = {x=pos.x, y=pos.y-1, z=pos.z}
doTeleportThing(cid, new, FALSE)
doSendMagicEffect(pos, 2)
end
function teleport2(param)
cid = param.cid
pos = getPlayerPosition(cid)
new = {x=pos.x, y=pos.y-1, z=pos.z}
doTeleportThing(cid, new, FALSE)
doSendMagicEffect(pos, 2)
end
function teleport3(param)
cid = param.cid
pos = getPlayerPosition(cid)
new = {x=pos.x, y=pos.y-1, z=pos.z}
doTeleportThing(cid, new, FALSE)
doSendMagicEffect(pos, 2)
end
function teleport4(param)
cid = param.cid
pos = getPlayerPosition(cid)
new = {x=pos.x, y=pos.y-1, z=pos.z}
doTeleportThing(cid, new, FALSE)
doSendMagicEffect(pos, 2)
end
function teleport5(param)
cid = param.cid
pos = getPlayerPosition(cid)
new = {x=pos.x, y=pos.y-1, z=pos.z}
doTeleportThing(cid, new, FALSE)
doSendMagicEffect(pos, 2)
end
function teleport6(param)
cid = param.cid
pos = getPlayerPosition(cid)
new = {x=pos.x, y=pos.y-1, z=pos.z}
doTeleportThing(cid, new, FALSE)
doSendMagicEffect(pos, 2)
end
function teleport7(param)
cid = param.cid
pos = getPlayerPosition(cid)
new = {x=pos.x, y=pos.y-1, z=pos.z}
doTeleportThing(cid, new, FALSE)
doSendMagicEffect(pos, 2)
end
function teleport8(param)
cid = param.cid
pos = getPlayerPosition(cid)
new = {x=pos.x, y=pos.y-1, z=pos.z}
doTeleportThing(cid, new, FALSE)
doSendMagicEffect(pos, 2)
mayNotMove(cid, 0)
end
Para fazer funfar, crie um arquivo .lua em data/actions/scripts que chame sotw.lua e adicione dentro dele o script acima, dps vai no actions.xml e add a tag abaixo:
Código:
<action actionid="3568" script="sotw.lua"/>
Creditos:[ B a l i l l o ]
______________________________________________________________________ . . .
!command para sabe os comandos do seu ot
Nesse tutorial vou explicar como colocar um comando para saber outros
vamos usar o talkaction para isto
abra data/talkactions/scripits e acrie um arquivo chamado cmd.lua
tire tudo o que tiver nele e coloque isto
Citação:
function onSay(cid, words, param)
doPlayerSendTextMessage(cid, 22, 'You can use the following commands: !frags, !uptime, !report, !online, !mana, !exp, !serverinfo, !leavehouse, !buyhouse, !sellhouse. Please use them with respect for other players.')
return 1
end
o que estiver em roxo sao os comandos do ot modifique de acordo com seu ot
agora va em data/talkactions/talkactions.xml e adicione isto
Citação:
<talkaction words="!command" script="cmd.lua"/>
pronto agora ao falar !command aparecera todos os comandos
Creditos By Conde
_________________________________________________________________________ . . .
!changesex
Abra: Data\talkactions\scripts, agora crie um arquivo .lua e o nomei para changesex, ficando: changesex,lua..
agora dentro dele ponha:
Código:
function onSay(cid, words, param)if getPlayerPremiumDays(cid) > 2 then
doPlayerRemovePremiumDays(cid, 3)
if getPlayerSex(cid) == 0 then
doPlayerSetSex(cid, 1)
else
doPlayerSetSex(cid, 0)
end
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have changed your sex and lost three days of premium account.")
else
doPlayerSendCancel(cid, "You do not have enough premium days, changing sex costs three of your premium days.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
agora em talkactions.xml adicione a seguinte tag:
Código:
<talkaction words="!changesex" script="changesex.lua" />
Explicação :
Preto : Quantos dias de premmy vai custar.
Rosa : Mensagem que vai aparecer quando o player comprar a mudança de sexo.
Azul : Mensagem que vai aparecer se o player nao tiver dias de premmy suficientes.
Creditos: LaB OrA
__________________________________________________________________________ . . .
Trainging Room
Créditos : Alreth do OTfans
Training Room nada mais eh do que uma sala de treinamento, mas com uma diferença, apenas um player poderá entrar, ficando assim sem risco de entrar PK
Imagem: http://img78.imageshack.us/img78/9444/imgoq0.jpg
training_room.lua
Código:
function onUse(cid, item, frompos, item2, topos)
-- <beginning> Training Room script by Alreth.
-- Version 1.0, last edited 2006-06-02 17:39
-- Beginning of editable Variabels
*** ***aidNor = 4211 -- Action id for door where training room is north of door
*** ***aidSou = 4212 -- Action id for door where training room is south of door
*** ***aidWes = 4213 -- Action id for door where training room is west of door
*** ***aidEas = 4214 -- Action id for door where training room is east of door
-- End of editable Variabels
***
*** ***emptyRoom = true
*** ***charPos = getPlayerPosition(cid)
***
*** ***if (item.actionid == aidNor) then
*** *** *** ***if (charPos.y < frompos.y) then
*** *** *** *** *** ***othersidePos = {x=frompos.x, y=frompos.y+1, z=frompos.z}
*** *** *** ***else
*** *** *** *** *** ***othersidePos = {x=frompos.x, y=frompos.y-1, z=frompos.z, stackpos=253}
*** *** *** *** *** ***things = getThingfromPos(othersidePos)
*** *** *** *** *** ***if (things.itemid == 1) then
*** *** *** *** *** *** *** ***if (getPlayerLevel(things.uid) > 0) then
*** *** *** *** *** *** *** *** *** ***emptyRoom = false
*** *** *** *** *** *** *** ***end
*** *** *** *** *** ***end
*** *** *** ***end
*** *** ***
*** ***elseif (item.actionid == aidSou) then
*** *** *** ***if (charPos.y > frompos.y) then
*** *** *** *** *** ***othersidePos = {x=frompos.x, y=frompos.y-1, z=frompos.z}
*** *** *** ***else
*** *** *** *** *** ***othersidePos = {x=frompos.x, y=frompos.y+1, z=frompos.z, stackpos=253}
*** *** *** *** *** ***things = getThingfromPos(othersidePos)
*** *** *** *** *** ***if (things.itemid == 1) then
*** *** *** *** *** *** *** ***if (getPlayerLevel(things.uid) > 0) then
*** *** *** *** *** *** *** *** *** ***emptyRoom = false
*** *** *** *** *** *** *** ***end
*** *** *** *** *** ***end
*** *** *** ***end
*** *** ***
*** ***elseif (item.actionid == aidEas) then
*** *** *** ***if (charPos.x > frompos.x) then
*** *** *** *** *** ***othersidePos = {x=frompos.x-1, y=frompos.y, z=frompos.z}
*** *** *** ***else
*** *** *** *** *** ***othersidePos = {x=frompos.x+1, y=frompos.y, z=frompos.z, stackpos=253}
*** *** *** *** *** ***things = getThingfromPos(othersidePos)
*** *** *** *** *** ***if (things.itemid == 1) then
*** *** *** *** *** *** *** ***if (getPlayerLevel(things.uid) > 0) then
*** *** *** *** *** *** *** *** *** ***emptyRoom = false
*** *** *** *** *** *** *** ***end
*** *** *** *** *** ***end
*** *** *** ***end
*** *** ***
*** ***elseif (item.actionid == aidWes) then
*** *** *** ***if (charPos.x < frompos.x) then
*** *** *** *** *** ***othersidePos = {x=frompos.x+1, y=frompos.y, z=frompos.z}
*** *** *** ***else
*** *** *** *** *** ***othersidePos = {x=frompos.x-1, y=frompos.y, z=frompos.z, stackpos=253}
*** *** *** *** *** ***things = getThingfromPos(othersidePos)
*** *** *** *** *** ***if (things.itemid == 1) then
*** *** *** *** *** *** *** ***if (getPlayerLevel(things.uid) > 0) then
*** *** *** *** *** *** *** *** *** ***emptyRoom = false
*** *** *** *** *** *** *** ***end
*** *** *** *** *** ***end
*** *** *** ***end
*** *** ***
*** ***end
***
*** ***if (emptyRoom == true) then
*** *** *** ***doTeleportThing(cid, othersidePos)
*** *** *** ***doSendMagicEffect(charPos, 2)
*** *** *** ***doSendMagicEffect(frompos, 12)
*** *** *** ***doSendMagicEffect(othersidePos, 10)
*** *** ***
*** ***else
*** *** *** ***doPlayerSendTextMessage(cid, 22, "This room is currently occupied. Please pick another or wait until the player leaves.")
*** ***end
-- <end> Training Room script by Alreth.
*** ***return 1
end
Adicione isso no actions.xml
Código:
*** ***<action actionid="4211" script="training_room.lua" />
*** ***<action actionid="4212" script="training_room.lua" />
*** ***<action actionid="4213" script="training_room.lua" />
*** ***<action actionid="4214" script="training_room.lua" />
*** ***
Para funcionar corretamente veja a imagem e coloque as actions ID abaixo:
http://img200.imageshack.us/img200/8734/imgfr4.jpg
___________________________________________________________________________ . . .
[8.1] Recompensa de Frags
Nome: Recompensa de Frags
Versão: 8.1
Tipo de Script: Action
Servidor Testado: Thyrania 0.2.81
Créditos: 20% meus e 80% Komic
Essa action permite que o killer ganhe um item mostrando o level que o player morreu, e o nome do morto.
Crie um arquivo chamado fragreward.lua na pasta data/npc/scripts e adicione:
Código:
function onPrepareDeath(cid, killer)loot = 5943
item = doPlayerAddItem(killer,loot,1)
doSetItemSpecialDescription(item,"This is the "..getItemName(loot).." of "..getPlayerName(cid).." at Level "..getPlayerLevel(cid)..".")
end
E adicione em creaturescripts.xml:
Código:
<event type="preparedeath" name="FragReward" script="fragreward.lua" />
____________________________________________________________________________ . . .
Da muito trabalho fazer um topico rox =)
CALMA EU AINDA NEM COMECEI...