Coloque return true antes do último end nos dois
Editado Janeiro 7 por Oneshot
info
Grupo: Visconde
Registrado: 21/09/10
Posts: 319
Reputação: +27
Char no Tibia: lest sarif

assim ?
local spellsb = {
["energy explosion"] = 2378,
["gale"] = 2385,
["twisting slash"] = 2376,
["elemental hits"] = 2377,
["meteor"] = 2382,
}
local spellsbids = {2390,2391,2392,2393,2394,2395,2396,2397,2398}
function onTextEdit(cid,item,newText)
for a = 1, #spellsbids do
local texte = {"energy explosion","gale","twisting slash","elemental hits","meteor"}
for b = 1, #texte do
if not texte then
doPlayerSendTextMessage(cid,27,"Spell dont exist.")
return true
end
if item.itemid == spellsbids[a] then
uid = spellsb[newText]
doSendMagicEffect(getThingPos(cid),30)
doTransformItem(item.uid, uid)
end
return true
end
return true
end
info
Grupo: Príncipe
Registrado: 19/08/10
Posts: 4k
Reputação: +1.1k
Gênero: Masculino

soh o ultimo mano.. ele flo pra por nos 2 scripts, o ¹ e ².. antes do ultimo 'end'
Use a script assim:
local spellsb = {
["energy explosion"] = 2378,
["gale"] = 2385,
["twisting slash"] = 2376,
["elemental hits"] = 2377,
["meteor"] = 2382,
}
local spellsbids = {2390, 2391, 2392, 2393, 2394, 2395, 2396, 2397, 2398}
function onTextEdit(cid,item,newText)
if not isInArray(spellsbids, item.itemid) then return true end
local spell = spellsb[newText:lower()]
if not spell then
doPlayerSendCancel(cid, "Spell doesn't exist.")
return false
end
doSendMagicEffect(getThingPos(cid), 30)
doTransformItem(item.uid, spell)
return false
end
info
Grupo: Visconde
Registrado: 21/09/10
Posts: 319
Reputação: +27
Char no Tibia: lest sarif

Obrigado





info
Grupo: Visconde
Registrado: 21/09/10
Posts: 319
Reputação: +27
Char no Tibia: lest sarif
Fala ai galera , eu tenho 2 scripts de onTextEdit aki
porém , quando eu criei o outro que ilhei apilidar de ² , quando eu ponho numeros para funcionar o script ¹ , o ² parece que trava ele
script :
local spellsb = { ["energy explosion"] = 2378, ["gale"] = 2385, ["twisting slash"] = 2376, ["elemental hits"] = 2377, ["meteor"] = 2382, } local spellsbids = {2390,2391,2392,2393,2394,2395,2396,2397,2398} function onTextEdit(cid,item,newText) for a = 1, #spellsbids do local texte = {"energy explosion","gale","twisting slash","elemental hits","meteor"} for b = 1, #texte do if not texte[b] then doPlayerSendTextMessage(cid,27,"Spell dont exist.") return true end if item.itemid == spellsbids[a] then uid = spellsb[newText] doSendMagicEffect(getThingPos(cid),30) doTransformItem(item.uid, uid) end end endPlease HELP -- nenhum erro no distro