function onUse(cid, item, frompos, item2, topos) if (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendCancel(cid,"Desculpe, nao pode estar em battle") return TRUE end if not isCreature(item2.uid) and not isPlayer(item2.uid) then return doPlayerSendCancel(cid,"Please use on you or in you summon.") end doRemoveItem(item.uid, 1) local minheal = 100 --minimo q vai healar local maxheal = 200 --maximo q pode healar doCreatureAddHealth(item2.uid, math.random(minheal, maxheal)) end
5
2k
info
Grupo: Visconde
Registrado: 11/08/10
Posts: 477
Reputação: +175
Gênero: Masculino

06 de novembro de 2010 às 12:38
Editado Novembro 6 por Eskylo
06 de novembro de 2010 às 12:53
function onUse(cid, item, frompos, item2, topos) if (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendCancel(cid,"Desculpe, nao pode estar em battle") return TRUE end if not isCreature(item2.uid) and not isPlayer(item2.uid) then return doPlayerSendCancel(cid,"Please use on you or in you summon.") end doRemoveItem(item.uid, 1) local minheal = 100 --minimo q vai healar local maxheal = 200 --maximo q pode healar doCreatureAddHealth(item2.uid, math.random(minheal, maxheal)) end
Ei mais tipow assim eu queria que fosse igual ao outro script que tivesse um tempo para ficar healando tipo era 10 segundos o tempo e a cada 2 segundos ele healasse 200 se puder fazer isso =D
info
Grupo: Visconde
Registrado: 11/08/10
Posts: 477
Reputação: +175
Gênero: Masculino

06 de novembro de 2010 às 13:05
function onUse(cid, item, frompos, item2, topos) if (getCreatureCondition(cid, CONDITION_INFIGHT) == TRUE) then doPlayerSendCancel(cid,"Desculpe, nao pode estar em battle") return TRUE end if not isCreature(item2.uid) and not isPlayer(item2.uid) then return doPlayerSendCancel(cid,"Please use on you or in you summon.") end doRemoveItem(item.uid, 1) local minheal = 1000 --minimo q a pot vai curar a cada intervalo local maxheal = 1500 --maximo q a pot vai curar a cada intervalo local heal = math.random(minheal, maxheal) --n mexa local intervalo = 2 --tempo entre intervalos em segundos local intervalo2 = intervalo*1000 --n mexa local tempo = 10 --tempo total local tempo2 = tempo*1000 --n mexa while intervalo2 <= tempo2 do addEvent(doCreatureAddHealth, intervalo2, item2.uid, heal) intervalo2 = intervalo2 + 2000 end
fiz uma gambiarra '-' tentai
Editado Novembro 6 por Eskylo



info
Grupo: Campones
Registrado: 19/09/10
Posts: 92
Reputação: +10
Gente tipow peguei um script do draky lucas que é uma potion igual ou + ou - igual ao do PO e ele só explicou como coloca para healar em % e nao explicou como heala em quantidade =/ eu queria que healasse em quantidade o script ta ai
Ajuda ai plx dou +rep =D