Ir para conteúdo

Featured Replies

Resolvido por MaTTch

Ir para solução
  • Respostas 23
  • Visualizações 4.1k
  • Created
  • Última resposta

Top Posters In This Topic

Most Popular Posts

Posted Images

Postado
  • Autor
Agora, Fir3element disse:

como funciona seu sistema de critical/dodge? storage? database?

storage

creaturescripts/script/Critical 

local lvlcrit = 48913
local multiplier = 1.9
local effect = 16




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)*1) >= math.random (0,1000) then
value = math.ceil(value*(multiplier))
doTargetCombatHealth(attacker, cid, combat, -value, -value, 255)
doSendMagicEffect(getCreaturePosition(cid), effect)
doSendAnimatedText(getCreaturePos(attacker), "Critical!", 35)
return false
end
end
return true
end

creaturescripts/script/Dodge

local lvldodge = 48902
local percent = 1.0


function onStatsChange(cid, attacker, type, combat, value)
if type == STATSCHANGE_HEALTHLOSS or type == STATSCHANGE_MANALOSS and isCreature(attacker) then
if (getPlayerStorageValue(cid, lvldodge)*3) >= math.random (0,1000) then
value = math.ceil(value*(percent))
doTargetCombatHealth(attacker, cid, combat, -value, -value, 255)
doSendAnimatedText(getCreaturePos(cid), "DODGE", 6)
return false
end
end
return true
end


Actions/script/Criticalrook
 

--- CRITICAL System by Night Wolf
   
  local config = {
   effectonuse = 14, -- efeito que sai
   levelscrit = 100,  --- leveis que terão
   storagecrit = 48913 -- 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).."/"..config.levelscrit.."].")
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

actions/script/dodgestone
 

 local config = {
   effectonuse = 14, -- efeito que sai
   levelsdodge = 100,  --- leveis que terão
   storagedodge = 48902 -- storage que será verificado
   }
   
function onUse(cid, item, frompos, item2, topos)
    if getPlayerStorageValue(cid, config.storagedodge) < config.levelsdodge then
   doRemoveItem(item.uid, 1)
doSendMagicEffect(topos,config.effectonuse)
doPlayerSendTextMessage(cid,22,"You've Leveled your Dodge Skill to ["..(getPlayerStorageValue(cid, config.storagedodge)+1).."/100].")
setPlayerStorageValue(cid, config.storagedodge, getPlayerStorageValue(cid, config.storagedodge)+1)
elseif getPlayerStorageValue(cid, config.storagedodge) >= config.levelsdodge then
doPlayerSendTextMessage(cid,22,"You've already reached the MAX level of Dodge Skill.\nCongratulations!!!!")
    return 0
    end
return 1
end

Actions.xml
 

	<action itemid="8302" event="script" value="dodgestone.lua"/>
	<action itemid="8303" script="criticalrock.lua"/>

 

Participe da conversa

Você pode postar agora e se cadastrar mais tarde. Se você tem uma conta, faça o login para postar com sua conta.

Visitante
Responder

Quem Está Navegando 0

  • Nenhum usuário registrado visualizando esta página.

Estatísticas dos Fóruns

  • Tópicos 96.9k
  • Posts 519.6k

Informação Importante

Confirmação de Termo