Galera ta dando o seguinte erro com meu script>
[05/12/2010 21:05:14] [Error - Action Interface] [05/12/2010 21:05:14] data/actions/scripts/actions novas/manarune.lua:onUse [05/12/2010 21:05:14] Description: [05/12/2010 21:05:14] data/actions/scripts/actions novas/manarune.lua:3: attempt to index local 'topos' (a nil value) [05/12/2010 21:05:14] stack traceback: [05/12/2010 21:05:14] data/actions/scripts/actions novas/manarune.lua:3: in function <data/actions/scripts/actions novas/manarune.lua:2>
Meu Script ta assim:
-- New MF rune******--
function onUse(cid, item, frompos, item2, itemEx, topos)
playerpos = {x=topos.x, y=topos.y, z=topos.z, stackpos=253}
player = getThingfromPos(playerpos)
ml = getPlayerMagLevel(cid)
lvl = getPlayerLevel(cid)
formula = math.random(((lvl+ml)*2)-(lvl-ml))
if item2.itemid == 1 and ml >= 2 then
doSendMagicEffect(playerpos,1)
doPlayerAddMana(player.uid,formula)
doPlayerSay(player.uid,"Yeah Mana For me!",2)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,0)
end
end
if item2.itemid == 1 and ml <= 1 then
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You dont Have Magic Level to use this rune.")
end
if item2.itemid >= 2 then
doPlayerSendCancel(cid,"You can only use this rune in you or in players.")
doSendMAgicEffect(frompos,2)
end
if((not(isSorcerer(itemEx.uid) or isDruid(itemEx.uid)) or getPlayerLevel(itemEx.uid) < 80) and getPlayerCustomFlagValue(itemEx.uid, PlayerCustomFlag_GamemasterPrivileges) == FALSE) then
doCreatureSay(itemEx.uid, "Only sorcerers and druids of level 80 or above may drink this fluid.", TALKTYPE_ORANGE_1)
return TRUE
end
return 1
end
Ajudem plx!! fast!







