BE
dúvida

(Action) Summon Monster Item

Por Bennyhappy, 24 de jul. de 2012 em Scripts

script
4
1.5k
BennyhappyB
24 de julho de 2012 às 03:58

Preciso de ajuda para terminar esse script,

o que eu tenho funciona bem, só preciso de acrescentar que só um monstro pode ser invocado no máximo, e dinheiro para remover 1 cc

 

function onUse(cid, item, frompos, item2, topos)
pos = getPlayerPosition(cid)
if item.itemid == 12432 then 
       if getPlayerLevel(cid) >= 150 then
               local creature = doSummonCreature("Dragon", pos)
               doConvinceCreature(cid, creature)
               doPlayerSay(cid,"Ve "..getCreatureName(creature).."!!!",1)
       else
               doPlayerSendCancel(cid, "Necesitas minimo lvl 150.")
               doSendMagicEffect(pos,CONST_ME_POFF)
               return true
       end
       doSendMagicEffect(topos,61)
end
return true
end

 

adicionar

doPlayerSendCancel(cid, "você já tem um suumon.")

y

doPlayerRemoveMoney(cid, 12000)

24 de julho de 2012 às 05:58
local function msgFalse(cid, a)
   doPlayerSendCancel(cid, a) doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
function onUse(cid, item, frompos, item2, topos)
   local pos, cost = getPlayerPosition(cid), 12000
   if item.itemid == 12432 then
       if #getCreatureSummons(cid) == 0 then
           if getPlayerLevel(cid) >= 150 then
               if doPlayerRemoveMoney(cid, cost) then
                   local creature = doSummonCreature("Dragon", pos)
                   doConvinceCreature(cid, creature)
                   doPlayerSay(cid, "Ve " .. getCreatureName(creature) .. "!!!", 1)
               else
                   msgFalse(cid, "Necesitas " .. cost .. "gps.")
               end
           else
               msgFalse(cid, "Necesitas minimo lvl 150.")
           end
       else
           msgFalse(cid, "Você já tem um summon.")
       end
       doSendMagicEffect(topos, 61)
   end
   return true
end


Editado Setembro 19 por fireelement

BennyhappyB
24 de julho de 2012 às 11:09

obrigado +rep

SkyLighS
24 de julho de 2012 às 11:14

reportado pra moverem

duvida sanada