GU

[ Resolvido ]Scripts.

Por guixap, 27 de abr. de 2010 em Archived

otserv
tibia
script
10
1.3k
guixapG
27 de abril de 2010 às 13:18

Olá Xtibiano's

 

Gostaria da ajuda de alguns scripters com 2 Scripts. [TÓPICO REVISADO E RESUMIDO]

 

Primeiro Script:

 

No primeiro script eu gostaria de um Reset com Stage. Eu pedirei de duas formas a primeira é a que eu preciso mais e a segunda é uma opicional mais fácil. (E caso não seja póssivel ser criado a primeira opção de Reset Stage, crie a segunda que creio que seja mais fácil).

 

Bom vamos ao Pedido. Todos sabemos que a Talkaction Resets está rodando por todos os Ots nA ServList e o meu Futuro server estará incluido nisso, mais eu gostaria de que ela fica-se um pouquinho mais perfeita da seguinte forma. Um Reset com Stages.

 

Primeira Opção.: [/i]A cada 4 resets seria acrescentado 25 leveis para o Level Requerido para o reset. (O player vai reseta 4X no level 350 na 5º tentativa ele terá que resetar no level 375 e assim sucessivamente aumentando so valores mais 4 Resets dae aumenta 25 leveis indo para o 400.).

 

Segunda Opção.: (Caso a primeira não seja possível), a cada reset aumentaria 4 leveis no level Requerido para Resetar, 1º Reset no level 350, no 2º level 354, no 3º level 358... E assim vai.

 

Script De resets

 

 

-- script by Marcryzius D'evil. --

function onSay(cid, words, param)

config = {

level=360, -- level necessario pra reseta.

RemainingLvl=8, -- level que ficará depois de ser resetado.

exper=4200, -- experiencia que ficará depois de ser resetado.

pid=getPlayerGUID(cid), -- não mecha

skull="yes", -- players com white skull podem resetar? ("yes" or "no").

redskull="no", -- players com red skull podem resetar? ("yes" or "no").

prot="no", -- players precisam estar em protection zone pra resetar? ("yes" or "no").

bat="yes" --players precisam estar sem fight pra resetarem? ("yes" or "no").

}

 

function getResets(cid)

reset = getPlayerStorageValue(cid,1020)

if reset < 0 then

reset = 0

end

return reset

end

 

if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then

doPlayerSendTextMessage(cid,22,"apenas players sem white skull podem resetar.")

return TRUE

end

 

if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then

doPlayerSendTextMessage(cid,22,"apenas player sem red skull podem resetar.")

return TRUE

end

 

if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then

doPlayerSendTextMessage(cid,22,"você precisa estar em protection zone pra poder resetar.")

return TRUE

end

 

if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then

doPlayerSendTextMessage(cid,22,"você precisa estar sem battle pra poder resetar.")

return TRUE

end

 

if getPlayerLevel(cid) >= config.level then

setPlayerStorageValue(cid,1020,getResets(cid)+1)

doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.")

doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.")

doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))

doRemoveCreature(cid)

db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)

else

doPlayerSendCancel(cid, "You need to have level "..config.level.." or more you may be reset.")

doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)

end

 

return TRUE

end

 

 

______________________________________________________________________

 

AUTO RESOLVI O SEGUNDO PROBLEMA

 

Segundo Script.:

 

Script da Last_Door da Poi, bom eu tenho ele no servidor aqui desativado, mais estão com as cordenadas mudadas e "tals", eu gostaria de que algúem postase esse script para mim se for póssivel e caso seja muito complicado de ajustalo que me mostra-se como mexer com ele. (Seria aquele script em que o player só passa na porta se conter as Storages necessárias, eu encontrei um no fórum mais não funcionou corretamente.)

 

Obs.: Só necessito do script da porta o que adiciona as storages eu já tenho.

 

Script da Door que tem no meu script, eu tentei arrumar aqui as cordenadas e tals como eu entendi só que não deu certo, se poderem ajudar agradeço.

 

 

function onUse(cid, item, fromPosition, itemEx, toPosition)

 

local charpos = getPlayerPosition(cid)

if item.uid == 8555 and charpos.x == 910 and (charpos.y == 1427 or charpos.y == 1426) and charpos.z == 11 then

if getPlayerStorageValue(cid,10274) == -1 or getPlayerStorageValue(cid,10275) == -1 or getPlayerStorageValue(cid,10276) == -1 or getPlayerStorageValue(cid,10277) == -1 or getPlayerStorageValue(cid,10278) == -1 or getPlayerStorageValue(cid,10279) == -1 or getPlayerStorageValue(cid,10280) == -1 then

doPlayerSendTextMessage(cid,25,'You did not absorb enough energy!')

else

local newPos = {x=911, y=1427, z=11}

doTeleportThing(cid, newPos)

doSendMagicEffect(newPos, 10)

end

 

elseif item.uid == 8555 and charpos.x == 910 and (charpos.y == 1427 or charpos.y == 1428) and charpos.z == 11 then

local newPos = {x=909, y=1427, z=11}

doSendMagicEffect(getPlayerPosition(cid), 2)

doTeleportThing(cid, newPos)

 

doSendMagicEffect({x=910,y=142,z=12}, 10)

end

return 1

end

Editado Abril 30 por XaPiNhAl

caarolina12C
27 de abril de 2010 às 13:53

 

function onSay(cid, words, param)
config = {
RemainingLvl=8, -- level que ficará depois de ser resetado.
exper=4200, -- experiencia que ficará depois de ser resetado.
pid=getPlayerGUID(cid), -- não mecha
skull="yes", -- players com white skull podem resetar? ("yes" or "no").
redskull="yes", -- players com red skull podem resetar? ("yes" or "no").
prot="yes", -- players precisam estar em protection zone pra resetar? ("yes" or "no").
bat="yes" --players precisam estar sem fight pra resetarem? ("yes" or "no").
}

function getResets(cid)
reset = getPlayerStorageValue(cid,1020)
if reset < 0 then
reset = 0
end
return reset
end 
if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then
doPlayerSendTextMessage(cid,22,"Apenas players sem white skull podem resetar.")
return TRUE
end
if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then
doPlayerSendTextMessage(cid,22,"Apenas player sem red skull podem resetar.")
return TRUE
end
if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid,22,"Você precisa estar em protection zone pra poder resetar.")
return TRUE
end
if(config.bat == "no") and (getCreatureCondition(cid, CONDITION_INFIGHT) == FALSE) then
doPlayerSendTextMessage(cid,22,"Você precisa estar sem battle pra poder resetar.")
return TRUE
end

if getPlayerStorageValue(cid,1020) > 5 then
if getPlayerLevel(cid) >= 370 then
setPlayerStorageValue(cid,1020,getResets(cid)+1)
doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.")
doPlayerPopupFYI(cid,"You now was reset, you have "..getResets(cid)+(1).." reset\'s.")
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)
else
doPlayerSendCancel(cid, "You need to have level "..level.." or more you may be reset.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
elseif getPlayerLevel(cid) >= 350 then
setPlayerStorageValue(cid,1020,getResets(cid)+1)
doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.")
doPlayerPopupFYI(cid,"You now was reset, you have "..getResets(cid)+(1).." reset\'s.")
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)
else
doPlayerSendCancel(cid, "You need to have level "..level.." or more you may be reset.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return TRUE
end

 

 

peguei esse script do outro fórum, mais pelo que eu vi após o quinto reset, você reseta quantas vezes quiser no level 370 =/

 

ve se você consegue arrumar ou pedir ajuda aqui no fórum =)

Editado Abril 27 por Caarolina

MatheusGladM
27 de abril de 2010 às 14:10

Po mano explica direito ai po, no primeiro nao intendi porcaria nenhuma e no segundo tbm, se quer que faça os tronos ou as portas?

 

No primeiro se quer que nois faça oque, varias talk que resetem em diferentes leveis?

 

 

 

Formule seus pedidos corretamente porque nao entendi nada

guedes100G
27 de abril de 2010 às 18:09

da poi:

 

actions/script poix.lua

 

-- poi

 

function onUse(cid, item, frompos, item2, topos)

 

if item.uid == 4066 then

queststatus = getPlayerStorageValue(cid,4066)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have absorved the spirit of Apocalypse, Total Destruction.")

setPlayerStorageValue(cid,4066,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 4064 then

queststatus = getPlayerStorageValue(cid,4064)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have absorved the spirit of Ashfalor, the Right Hand of Urgith. The general of the undead hordes.")

setPlayerStorageValue(cid,4064,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 4060 then

queststatus = getPlayerStorageValue(cid,4060)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have absorved the spirit of Infernatil, the Incendiary of Hell.")

setPlayerStorageValue(cid,4060,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 4062 then

queststatus = getPlayerStorageValue(cid,4062)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have absorved the spirit of Tafariel, the Mistress of the Damned.")

setPlayerStorageValue(cid,4062,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

end

elseif item.uid == 4058 then

queststatus = getPlayerStorageValue(cid,4058)

if queststatus == -1 then

doPlayerSendTextMessage(cid,22,"You have absorved the spirit of Verminor, the Plaguelord.")

setPlayerStorageValue(cid,4058,1)

else

doPlayerSendTextMessage(cid,22,"It is empty.")

 

end

else

return 0

end

 

return 1

end

 

nos tronos voce coloca cada UniqueID: 4066,4064,4060,4062,4058

 

actions.xml adicione as linhas:

 

<!-- POI -->

<action uniqueid="4058" script="poix.lua" />

<action uniqueid="4060" script="poix.lua" />

<action uniqueid="4066" script="poix.lua" />

<action uniqueid="4062" script="poix.lua" />

<action uniqueid="4064" script="poix.lua" />

 

ai nas ActionID da closed door da poi voce coloca: 4066,4064,4060,4062,4058

Editado Abril 27 por Nicekid

guixapG
30 de abril de 2010 às 12:33

Tópico [Editado, Revisado e Resumido] --- Segundo Problema Resolvido Rep+ para o NickeId

MatheusGladM
30 de abril de 2010 às 12:49

Tem como posta seu npc ou talkaction pra resets, pra eu entregar tudo pronto pra tu xD

KydraiK
30 de abril de 2010 às 19:33

Fiz aqui e deve ta funcionando.

Edite essa parte:

stages = 4,

lvlByStage = 25

 

-- script by Marcryzius D'evil. --
function onSay(cid, words, param)
config = {
level=360, -- level necessario pra reseta.
RemainingLvl=8, -- level que ficará depois de ser resetado.
exper=4200, -- experiencia que ficará depois de ser resetado.
pid=getPlayerGUID(cid), -- não mecha
skull="yes", -- players com white skull podem resetar? ("yes" or "no").
redskull="no", -- players com red skull podem resetar? ("yes" or "no").
prot="no", -- players precisam estar em protection zone pra resetar? ("yes" or "no").
bat="yes", --players precisam estar sem fight pra resetarem? ("yes" or "no").
stages = 4,
lvlByStage = 25
}

function getResets(cid)
reset = getPlayerStorageValue(cid,1020)
if reset < 0 then
reset = 0
end
return reset
end

if(config.skull == "no") and (getCreatureSkullType(cid) == 3) then
doPlayerSendTextMessage(cid,22,"apenas players sem white skull podem resetar.")
return TRUE
end

if(config.redskull == "no") and (getCreatureSkullType(cid) == 4) then
doPlayerSendTextMessage(cid,22,"apenas player sem red skull podem resetar.")
return TRUE
end

if(config.prot == "yes") and (getTilePzInfo(getCreaturePosition(cid)) == FALSE) then
doPlayerSendTextMessage(cid,22,"você precisa estar em protection zone pra poder resetar.")
return TRUE
end

if(config.bat == "yes") and (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then
doPlayerSendTextMessage(cid,22,"você precisa estar sem battle pra poder resetar.")
return TRUE
end

local needlvl = config.level + (config.lvlByStage * math.floor(getResets(cid)/config.stages))

if getPlayerLevel(cid) >= needlvl then
setPlayerStorageValue(cid,1020,getResets(cid)+1)
doPlayerSetNameDescription(cid, " Have a "..getResets(cid)+(1).." reset\'s.")
doPlayerPopupFYI(cid,"you now was reset, you have "..getResets(cid)+(1).." reset\'s.")
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.RemainingLvl..", `experience` = "..config.exper.." WHERE `id` = "..config.pid)
else
doPlayerSendCancel(cid, "You need to have level "..config.level.." or more you may be reset.")
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end

return TRUE
end

guixapG
03 de maio de 2010 às 14:49

TÓPICO 100% RESOLVIDO REP+ PARA KYDRAI E NICKEID.

guedes100G
03 de maio de 2010 às 16:54

estarei reportando o topico para que os moderadores possam fechar

 

sempre que sua duvida ou pedido tenham sido sanados favor usar o botao "denunciar" para que os mesmo fechem o topico.

 

abraços

Henrique MouraH
03 de maio de 2010 às 19:10

Tópico fechado!