Emooooo 0 Postado 7 horas Share Postado 7 horas creaturescripts.xml <!-- CRITICAL SYSTEM --> <event type="statschange" name="critical" event="script" value="critical.lua"/> creaturescripts\scripts\login.lua --- CRITICAL SYSTEM ---- registerCreatureEvent(cid, "critical") if getPlayerStorageValue(cid, 48903) == -1 then setPlayerStorageValue(cid, 48903, 0) end creaturescripts\scripts\critical.lua: -----[[Critical System by Night Wolf]] local lvlcrit = 48903 local multiplier = 1.5 function onStatsChange(cid, attacker, type, combat, value) if (type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS) and isPlayer(attacker) and isCreature(cid) then if (getPlayerStorageValue(attacker, lvlcrit)*3) >= math.random (0,1000) then value = math.ceil(value*(multiplier)) doTargetCombatHealth(attacker, cid, combat, -value, -value, 255) doSendAnimatedText(getCreaturePos(attacker), "CRITICAL!!", 144) return false end end return true end actions.xml: <action itemid="1294" script="criticalrock.lua"/> obs: muda o ID da pedra que vc for usar... aqui eu usei a small stone pra teste e em actions\scripts\criticalrock.lua: --- CRITICAL System by Night Wolf local config = { effectonuse = 14, -- efeito que sai levelscrit = 100, --- leveis que terão storagecrit = 48903 -- storage que será verificado } function onUse(cid, item, frompos, item2, topos) if getPlayerStorageValue(cid, config.storagecrit) < config.levelscrit then doRemoveItem(item.uid, 1) doSendMagicEffect(topos,config.effectonuse) doPlayerSendTextMessage(cid,22,"You've Leveled your Critical Skill to ["..(getPlayerStorageValue(cid, config.storagecrit)+1).."/100].") setPlayerStorageValue(cid, config.storagecrit, getPlayerStorageValue(cid, config.storagecrit)+1) elseif getPlayerStorageValue(cid, config.storagecrit) >= config.levelscrit then doPlayerSendTextMessage(cid,22,"You've already reached the MAX level of Critical Skill.\nCongratulations!!!!") return 0 end return 1 end Link para o comentário Compartilhar em outros sites More sharing options...
Pergunta
Emooooo 0
creaturescripts.xml
<!-- CRITICAL SYSTEM --> <event type="statschange" name="critical" event="script" value="critical.lua"/>
creaturescripts\scripts\login.lua
creaturescripts\scripts\critical.lua:
actions.xml:
obs: muda o ID da pedra que vc for usar... aqui eu usei a small stone pra teste
e em actions\scripts\criticalrock.lua:
Link para o comentário
Compartilhar em outros sites
0 respostass a esta questão
Posts Recomendados