Histórico de Curtidas
-
PH deu reputação a Pedriinz em (Resolvido)PROBLEMAS COM O PKTroque seu creature.lua por este:
function Creature:onChangeOutfit(outfit) return true end function Creature:onAreaCombat(tile, isAggressive) return RETURNVALUE_NOERROR end local function removeCombatProtection(cid) local player = Player(cid) if not player then return true end local time = 0 if player:isMage() then time = 10 elseif player:isPaladin() then time = 20 else time = 30 end player:setStorageValue(Storage.combatProtectionStorage, 2) addEvent(function(cid) local player = Player(cid) if not player then return end player:setStorageValue(Storage.combatProtectionStorage, 0) player:remove() end, time * 1000, cid) end function Creature:onTargetCombat(target) if not self then return true end if target:isPlayer() then if self:isMonster() then local protectionStorage = target:getStorageValue(Storage.combatProtectionStorage) if target:getIp() == 0 then -- If player is disconnected, monster shall ignore to attack the player if not target:isPzLocked() then if protectionStorage <= 0 then addEvent(removeCombatProtection, 30 * 1000, target.uid) target:setStorageValue(Storage.combatProtectionStorage, 1) elseif protectionStorage == 1 then self:searchTarget() return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end return true end if protectionStorage >= os.time() then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end if PARTY_PROTECTION ~= 0 then if self:isPlayer() and target:isPlayer() then local party = self:getParty() if party then local targetParty = target:getParty() if targetParty and targetParty == party then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end end if ADVANCED_SECURE_MODE ~= 0 then if self:isPlayer() and target:isPlayer() then if self:hasSecureMode() then return RETURNVALUE_YOUMAYNOTATTACKTHISPLAYER end end end return true end E teste. (:
-
PH deu reputação a nobrutv em (Resolvido)Utiti tempo san BUGADATenta isso, @PH
local combat = Combat() combat:setParameter(COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN) combat:setParameter(COMBAT_PARAM_AGGRESSIVE, false) local skill = Condition(CONDITION_ATTRIBUTES) skill:setParameter(CONDITION_PARAM_TICKS, 10000) skill:setParameter(CONDITION_PARAM_SKILL_DISTANCEPERCENT, 150) skill:setParameter(CONDITION_PARAM_SKILL_SHIELDPERCENT, -100) skill:setParameter(CONDITION_PARAM_BUFF_SPELL, true) combat:setCondition(skill) local speed = Condition(CONDITION_PARALYZE) speed:setParameter(CONDITION_PARAM_TICKS, 10000) speed:setFormula(-0.7, 56, -0.7, 56) combat:setCondition(speed) local cooldownHealingGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) cooldownHealingGroup:setParameter(CONDITION_PARAM_TICKS, 10000) cooldownHealingGroup:setParameter(CONDITION_PARAM_SUBID, 2) combat:setCondition(cooldownHealingGroup) local cooldownSupportGroup = Condition(CONDITION_SPELLGROUPCOOLDOWN) cooldownSupportGroup:setParameter(CONDITION_PARAM_TICKS, 10000) cooldownSupportGroup:setParameter(CONDITION_PARAM_SUBID, 3) combat:setCondition(cooldownSupportGroup) function onCastSpell(creature, variant) return combat:execute(creature, variant) end