LF
dúvida

Err Talkactions

Por lfelipebsilva05, 02 de jul. de 2012 em Scripts

script
20
1.6k
02 de julho de 2012 às 11:31

380595_307509079344758_1952703998_n.jpg

dando esse seguinte erro no meu script...

alguem poderia me ajudar? obg REP +

VodkartV
02 de julho de 2012 às 11:34

posta o seu promo.lua aqui amigo

02 de julho de 2012 às 11:36

local table = {

["mixed"] = {reqVoc=, reqLevel=10000, reqItem=0, reqCount=0, reqMoney=0, newVoc=5, newLevel=8, newMana=, newHp=},

["spin"] = {reqVoc=5, reqLevel=30000, reqItem=0, reqCount=0, reqMoney=0, newVoc=6, newLevel=8, newMana=, newHp=},

["sacred"] = {reqVoc=6, reqLevel=60000, reqItem=0, reqCount=0, reqMoney=0, newVoc=7, newLevel=8, newMana=, newHp=},

["loney"] = {reqVoc=7, reqLevel=110000, reqItem=0, reqCount=0, reqMoney=0, newVoc=8, newLevel=30000, newMana=, newHp=},

["falling"] = {reqVoc=8, reqLevel=130000, reqItem=0, reqCount=0, reqMoney=0, newVoc=9, newLevel=90000, newMana=,

 

newHp=},

["hell"] = {reqVoc=9, reqLevel=250000, reqItem=0, reqCount=0, reqMoney=0, newVoc=10, newLevel=8, newMana=, newHp=},

["supreme"] = {reqVoc=10, reqLevel=310000, reqItem=0, reqCount=0, reqMoney=0, newVoc=11, newLevel=8, newMana=, newHp=},

["forgotten"] = {reqVoc=11, reqLevel=550000, reqItem=0, reqCount=0, reqMoney=0, newVoc=12, newLevel=8, newMana=,

 

newHp=},

["nova"] = {reqVoc=12, reqLevel=715000, reqItem=0, reqCount=0, reqMoney=0, newVoc=13, newLevel=8, newMana=, newHp=}

["zealot1"] = {reqVoc=13, reqLevel=715000, reqItem=0, reqCount=0, reqMoney=0, newVoc=14, newLevel=8, newMana=, newHp=},

["zealote2"] = {reqVoc=14, reqLevel=715000, reqItem=0, reqCount=0, reqMoney=0, newVoc=17, newLevel=8, newMana=, newHp=}

}

function onSay(cid,words, param, channel)

local param = param.explode(param, ",")

for k, v in pairs(table) do

if (param == k) then

if getPlayerVocation(cid) ~= v.reqVoc then

doPlayerSendCancel(cid, "You dont have the required vocation.")

return false

end

if getPlayerLevel(cid) ~= v.reqLevel then

doPlayerSendCancel(cid, "You dont have the required level.")

return false

end

if v.reqItem ~= 0 then

if v.reqMoney ~= 0 then

if not(doPlayerRemoveItem(cid, v.reqItem, v.reqCount) and doPlayerRemoveMoney(cid, v.reqMoney) then

doPlayerSendCancel(cid, "You dont have the required item or money.")

return false

end

else

if not(doPlayerRemoveItem(cid, v.reqItem, v.reqCount) then

doPlayerSendCancel(cid, "You dont have the required item.")

return false

end

end

end

doPlayerSetVocation(cid, v.newVoc)

doPlayerSetLevel(cid, v.newLevel)

setCreatureMaxMana(cid, v.newMana)

setCreatureMaxHealth(cid, v.newHp)

doCreatureAddHealth(cid, v.newHp - getCreatureHealth(cid))

doCreatureAddMana(cid, v.newMana - getCreatureMana(cid))

doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You reset well! You are going to be kicked for security reasons in 5

 

seconds.")

addEvent(doPlayerSendTextMessage, 1000, MESSAGE_INFO_DESCR, "4 seconds.")

addEvent(doPlayerSendTextMessage, 2000, MESSAGE_INFO_DESCR, "3 seconds.")

addEvent(doPlayerSendTextMessage, 3000, MESSAGE_INFO_DESCR, "2 seconds.")

addEvent(doPlayerSendTextMessage, 4000, MESSAGE_INFO_DESCR, "1 seconds.")

addEvent(doRemoveCreature, 5000, cid)

end

return true

end

Editado Julho 2 por lfelipebsilva05

VodkartV
02 de julho de 2012 às 11:44

rapaz seu script está muito confuso rsrs

outra coisa, nos index na tabela você é obrigado a preencher os index com algum tipo de informação, seja números ou strings, caso não quiser preencher tenta colocar como "nil"

 

tenta

 

local table = {
["mixed"] = {reqVoc=nil, reqLevel=10000, reqItem=0, reqCount=0, reqMoney=0, newVoc=5, newLevel=8, newMana=0, newHp=0},
["spin"] = {reqVoc=5, reqLevel=30000, reqItem=0, reqCount=0, reqMoney=0, newVoc=6, newLevel=8, newMana=0, newHp=0},
["sacred"] = {reqVoc=6, reqLevel=60000, reqItem=0, reqCount=0, reqMoney=0, newVoc=7, newLevel=8, newMana=0, newHp=0},
["loney"] = {reqVoc=7, reqLevel=110000, reqItem=0, reqCount=0, reqMoney=0, newVoc=8, newLevel=30000, newMana=0, newHp=0},
["falling"] = {reqVoc=8, reqLevel=130000, reqItem=0, reqCount=0, reqMoney=0, newVoc=9, newLevel=90000, newMana=0}
} 
function onSay(cid,words, param, channel)
local param = param.explode(param, ",")
for k, v in pairs(table) do
if (param == k) then
if v.reqVoc ~= nil and getPlayerVocation(cid) ~= v.reqVoc then
doPlayerSendCancel(cid, "You dont have the required vocation.")
return false
end
if getPlayerLevel(cid) ~= v.reqLevel then
doPlayerSendCancel(cid, "You dont have the required level.")
return false
end
if v.reqItem ~= 0 then
if v.reqMoney ~= 0 then
if not doPlayerRemoveItem(cid, v.reqItem, v.reqCount) and doPlayerRemoveMoney(cid, v.reqMoney) then
doPlayerSendCancel(cid, "You dont have the required item or money.")
return false
end
else
if not doPlayerRemoveItem(cid, v.reqItem, v.reqCount) then
doPlayerSendCancel(cid, "You dont have the required item.")
return false
end
end
end
doPlayerSetVocation(cid, v.newVoc)
doPlayerSetLevel(cid, v.newLevel)
setCreatureMaxMana(cid, v.newMana)
setCreatureMaxHealth(cid, v.newHp)
doCreatureAddHealth(cid, v.newHp - getCreatureHealth(cid))
doCreatureAddMana(cid, v.newMana - getCreatureMana(cid))
doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You reset well! You are going to be kicked for security reasons in 5 seconds.")
addEvent(doPlayerSendTextMessage, 1000, MESSAGE_INFO_DESCR, "4 seconds.")
addEvent(doPlayerSendTextMessage, 2000, MESSAGE_INFO_DESCR, "3 seconds.")
addEvent(doPlayerSendTextMessage, 3000, MESSAGE_INFO_DESCR, "2 seconds.")
addEvent(doPlayerSendTextMessage, 4000, MESSAGE_INFO_DESCR, "1 seconds.")
addEvent(doRemoveCreature, 5000, cid)
end
end
return true
end 

Editado Julho 2 por Vodkart

02 de julho de 2012 às 11:50

cara esta com o mesmo erro.

isso dai e 1sistema de reset vocation.

 

que tu fala . !promomixed .... !promospin etc.... testei ele agora tem como indireitar? e tirar esse tempo de 5segundos.

VodkartV
02 de julho de 2012 às 11:54

tem sim, eu só vou almoçar e vou refazer todo seu script e usando db que fica melhor, outra coisa, no seu script ele precisa só ter a voc e o level para resetar né?

dps ele ganha uma nova voc e mais lvl?

02 de julho de 2012 às 12:12

 

 

eu ja preparei a vocation.xml , la ganhara masi hp e mana por cada reset. e skills.

ele podia resetar lvl todos pro lvl 8 , com mana e life de lvl 8 . porque o gain vai por cada lvl adiante.

e tpw e assim.

sorc druid pala e kina. lvl 10k reseta pra mixed .

dps mixed vira spin assim por diante.

 

 

pra você entender melhor.

entre nesse ot .

ip: raiva.servegame.com

versão: 8.6

login : gogote

senha : wonder

 

fale . !promoinfo que ira explicar melhor que eu. Obrigo ai lek

Editado Julho 2 por lfelipebsilva05

VodkartV
02 de julho de 2012 às 12:41

Então depois de usar o comando ele vai voltar para level 8, com mana e hp de lvl 8 certo?

só vai ser mudado a vocation , é isso?

02 de julho de 2012 às 12:48

sim sim. e bota lugar pra eu mudar so o lvl de reset

VodkartV
02 de julho de 2012 às 13:12
function onSay(cid, words, param, channel)
local tabble = {
["mixed"] = {reqVoc= nil, needLevel=10000},
["spin"] = {reqVoc= 5, needLevel=30000},
["sacred"] = {reqVoc= 6, needLevel=60000},
["loney"] = {reqVoc= 7, needLevel=110000},
["falling"] = {reqVoc= 8, needLevel=130000}
}
local config = {pid = getPlayerGUID(cid),newlv = 8,life = 185,mana = 35}
local param = string.lower(param)
if not tabble[param] then
doPlayerSendCancel(cid, "digite o nome correto.") return true
elseif getTilePzInfo(getCreaturePosition(cid)) == FALSE then
doPlayerSendCancel(cid, "precisa estar em pz.") return true
elseif getPlayerLevel(cid) < tabble[param].needLevel then
doPlayerSendCancel(cid, "You dont have the required level.") return true
elseif tabble[param].reqVoc == nil and getPlayerStorageValue(cid, 877878) >= 1 then
doPlayerSendCancel(cid, "você já virou mixed.") return true
elseif tabble[param].reqVoc ~= nil and getPlayerVocation(cid) ~= tabble[param].reqVoc then
doPlayerSendCancel(cid, "You dont have the required vocation.") return true
end
if tabble[param].reqVoc == nil then setPlayerStorageValue(cid, 877878, 1) end
local newvoc = tabble[param].reqVoc ~= nil and (tabble[param].reqVoc+1) or 5
doTeleportThing(cid, getTownTemplePosition(getPlayerTown(cid)))
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` SET `level` = "..config.newlv..", `experience` = "..getExperienceForLevel(config.newlv)..",`manamax` = "..config.mana..",`health` = "..config.life..", `healthmax` = "..config.life..",`mana` = "..config.mana..",`vocation` = "..newvoc.." WHERE `id` = "..config.pid)
return true
end

Editado Julho 3 por Vodkart

02 de julho de 2012 às 13:38

1duvida.

 

["falling"] = {reqVoc= 8, needLevel=130000}

 

posso adc mais? exp.

 

["hellborn"] = {reqVoc= 9, needLevel=250000}

 

etc...

 

cara como eu poderia por no talkactions pra usar o comando assim

.

 

!mixedpromo

!spinpromo

!sacredpromo etc... vlw ja dei REP

VodkartV
02 de julho de 2012 às 13:41

pode adicionar mais sim, sobre a segunda dúvida acho que de vez de 'param' teria que usar 'words', mas porque não !promo "nome da promotion?

 

 

exemplo

 

!promo mixed

02 de julho de 2012 às 13:45

ixi ta com 1 errinho cara.

eu peguei lvl 10k resetei mixed

ai peguei 10k dnv da pra reseta mixed dnv, ai quando achar anda ele debuga e debuga o char ;s

 

meu ta assim , !promo mixed ta de boa.

 

cara resetei mixed dps vou resetar spin . fala q nao tenho vocaçao ;/

VodkartV
02 de julho de 2012 às 13:48

da uma olhada no seu server para ver se depois que relogam as vocs voltam, tem distro que tem esse bug! vê aí

02 de julho de 2012 às 13:53

482029_307568962672103_438963302_n.jpg

 

 

ai cara ta limpo o certinho =/. cara tem msn ? fica mais facil de resolver'