O script tem item2 e itemEx, so pode ter um, ou item2, ou itemEx
Tenta assim:
-- New MF rune******--
function onUse(cid, item, frompos, 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 itemEx.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 itemEx.itemid == 1 and ml <= 1 then
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You dont Have Magic Level to use this rune.")
end
if itemEx.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






info
Grupo: Campones
Registrado: 07/04/08
Posts: 16
Reputação: +1
Galera ta dando o seguinte erro com meu script>
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 endAjudem plx!! fast!
Editado Dezembro 5 por Pedrokkkk