Cara, não funcionou aqui, fiz tudo que você pediu, mas quando eu boto
e entro no server, aparece isso:<flag convinceable="1"/>
[10/08/2011 16:04:06] [Error - CreatureScript Interface][10/08/2011 16:04:06] data/creaturescripts/scripts/firstitems.lua:onLogin
[10/08/2011 16:04:06] Description:
[10/08/2011 16:04:06] data/creaturescripts/scripts/firstitems.lua:55: bad argument #1 to 'maxn' (table expected, got nil)
[10/08/2011 16:04:06] stack traceback:
[10/08/2011 16:04:06] [C]: in function 'maxn'
[10/08/2011 16:04:06] data/creaturescripts/scripts/firstitems.lua:55: in function <data/creaturescripts/scripts/firstitems.lua:53>
Infelizmente, eu tentei colocar o flag convinceable no 0 mais não funcionou, quando eu escrevia !criar apenas falava que eu não tinha level, mesmo eu sendo level 70k >.>




info
Grupo: Visconde
Registrado: 22/09/10
Posts: 474
Reputação: +47
Sistema por talkactions
Descrição
Talkactions/scripts
function onSay(cid, words, param, itemEx, params) if isCreature(cid) then if words == "!back" then doRemoveCreature(x) return True end end local summons = getCreatureSummons(cid) local monster = { ["dragon lord hatchling"] = { Level = 10, Levelmax = 30, Voc = 1, Vocp = 5 }, ["dragon hatchling"] = { Level = 10, Levelmax = 30, Voc = 2, Vocp = 6 }, ["frost dragon hatchling"] = { Level = 10, Levelmax = 30, Voc = 3, Vocp = 7 }, ["dark dragon hatchling"] = { Level = 10, Levelmax = 30, Voc = 4, Vocp = 8 } } for k,v in pairs(monster) do if getPlayerVocation(cid) == v.Voc or getPlayerVocation(cid) == v.Vocp then if getPlayerLevel(cid) >= v.Level and getPlayerLevel(cid) <= v.Levelmax then if (table.maxn(summons) < 1)then if getTilePzInfo(getCreaturePosition(cid)) == false then x = doSummonCreature(k, getCreaturePosition(cid)) doConvinceCreature(cid, x) doCreatureSay(cid, "Go to me ,".. k,1) else doPlayerSendCancel(cid, "Sorry, You cannot create Element Pet in pz.") end else doPlayerSendCancel(cid, "Sorry, You can not create more than one Element Pet.") end else doPlayerSendCancel(cid, "Sorry, You no have Level for creat your Element Pet.") end end end return true endTalkactions.xml
<talkaction words="!criar" script="vocationsummon.lua"/> <talkaction words="!back" script="vocationsummon.lua"/>Editando
["Nome do Monster"] = { Level = Level Minimo, Levelmax = Level Maximo, Voc = Vocação, Vocp = Promotion },não esqueça de editar a flag
no monster
e no ultimo monster da tabela não deve ter virgula no final
Tirando Lvl Max
Procure por
e Deixa assim
Gosto ? Da ++rep não cai o dedo