本文整理汇总了C#中RunescapeServer.player.Player.setAntifireCycles方法的典型用法代码示例。如果您正苦于以下问题:C# Player.setAntifireCycles方法的具体用法?C# Player.setAntifireCycles怎么用?C# Player.setAntifireCycles使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类RunescapeServer.player.Player
的用法示例。
在下文中一共展示了Player.setAntifireCycles方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: resetVariables
private void resetVariables(Player p) {
p.setSkullCycles(0);
p.getSpecialAttack().resetSpecial();
p.setLastkiller(null);
p.setDead(false);
p.setEntityFocus(65535);
p.setPoisonAmount(0);
p.clearKillersHits();
p.setLastVengeanceTime(0);
p.setVengeance(false);
p.removeTemporaryAttribute("willDie");
p.setFrozen(false);
p.removeTemporaryAttribute("unmovable");
p.setAntifireCycles(0);
p.setSuperAntipoisonCycles(0);
p.setTeleblockTime(0);
p.removeTemporaryAttribute("teleblocked");
p.setTarget(null);
p.setAttacker(null);
foreach (Skills.SKILL skill in Enum.GetValues(typeof(Skills.SKILL)))
p.getSkills().setCurLevel(skill, p.getSkills().getMaxLevel(skill));
p.getPackets().sendSkillLevels();
Prayer.deactivateAllPrayers(p);
if (p.getTemporaryAttribute("cantDoAnything") != null) {
p.getAppearance().setInvisible(false);
p.getUpdateFlags().setAppearanceUpdateRequired(true);
p.removeTemporaryAttribute("cantDoAnything");
p.removeTemporaryAttribute("unmovable");
teleportToWaitingRoom(p, false);
p.getPackets().closeInterfaces();
p.getPackets().setMinimapStatus(0);
p.getPackets().clearMapFlag();
}
}
示例2: drinkPotion
//.........这里部分代码省略.........
case 6: //Agility potion [restores 2 or 3 agility points]
int newAgility = misc.random(2, 3) + p.getSkills().getCurLevel(Skills.SKILL.AGILITY);
if (newAgility < p.getSkills().getMaxLevel(Skills.SKILL.AGILITY))
p.getSkills().setCurLevel(Skills.SKILL.AGILITY, newAgility);
break;
case 7: //Combat potion [Should be 10% of attack+strength and +3 to each].
statBoost(p, Skills.SKILL.ATTACK, 0.10, 3, false);
statBoost(p, Skills.SKILL.STRENGTH, 0.10, 3, false);
break;
case 8: //Prayer potion, [heals 7-31, formula = 7+floor(prayerlevel/4)]
int newPrayer = 7 + (int)Math.Floor((double)(p.getSkills().getMaxLevel(Skills.SKILL.PRAYER) / 4)) + p.getSkills().getCurLevel(Skills.SKILL.PRAYER);
if (newPrayer < p.getSkills().getCurLevel(Skills.SKILL.PRAYER))
p.getSkills().setCurLevel(Skills.SKILL.PRAYER, newPrayer);
checkOverdose(p, Skills.SKILL.PRAYER);
break;
case 9: //Summoning potion [25% of players summoning + 7]
int newSummoning = (7 + (int)((double)p.getSkills().getMaxLevel(Skills.SKILL.SUMMONING) * 0.25)) + p.getSkills().getCurLevel(Skills.SKILL.SUMMONING);
if (newSummoning < p.getSkills().getCurLevel(Skills.SKILL.SUMMONING))
p.getSkills().setCurLevel(Skills.SKILL.SUMMONING, newSummoning);
statBoost(p, Skills.SKILL.STRENGTH, 0.10, 3, false);
break;
case 10: //Super attack potion [15% of players attack + 5]
statBoost(p, Skills.SKILL.ATTACK, 0.15, 5, false);
break;
case 11: // super antipoison
p.setPoisonAmount(0);
p.setSuperAntipoisonCycles(20);
break;
case 12: //Fishing potion [fishing +3]
if (p.getSkills().getCurLevel(Skills.SKILL.FISHING) < (p.getSkills().getMaxLevel(Skills.SKILL.FISHING) + 3))
p.getSkills().setCurLevel(Skills.SKILL.FISHING, p.getSkills().getCurLevel(Skills.SKILL.FISHING) + 3);
break;
case 13:
p.setRunEnergy(p.getRunEnergy() + 20);
if (p.getRunEnergy() >= 100) {
p.setRunEnergy(100);
}
break;
case 14: //Hunter potion [hunting + 3]
if (p.getSkills().getCurLevel(Skills.SKILL.HUNTER) < (p.getSkills().getMaxLevel(Skills.SKILL.HUNTER) + 3))
p.getSkills().setCurLevel(Skills.SKILL.HUNTER, p.getSkills().getCurLevel(Skills.SKILL.HUNTER) + 3);
break;
case 15: //Super strength [strength 15% +5]
statBoost(p, Skills.SKILL.STRENGTH, 0.15, 5, false);
break;
case 16: //restores all skills by 33%.
foreach (Skills.SKILL skill in Enum.GetValues(typeof(Skills.SKILL)))
superRestorePotion(p, skill, 0.33);
break;
case 17://Super defence [defence 15% +5]
statBoost(p, Skills.SKILL.DEFENCE, 0.15, 5, false);
break;
case 18: // Antifire potion
p.setAntifireCycles(20);
break;
case 19: //Ranging potions
statBoost(p, Skills.SKILL.RANGE, 0.10, 4, false);
break;
case 20: //Magic potion.
if (p.getSkills().getCurLevel(Skills.SKILL.MAGIC) < (p.getSkills().getMaxLevel(Skills.SKILL.MAGIC) + 4))
p.getSkills().setCurLevel(Skills.SKILL.MAGIC, p.getSkills().getCurLevel(Skills.SKILL.MAGIC) + 4);
break;
case 21: //Zamorak brew potion. [Attack %20+2][Strength %12 +2][Defense -10% + -2][hitpoints -10% + 20]
statBoost(p, Skills.SKILL.ATTACK, 0.20, 2, false);
statBoost(p, Skills.SKILL.STRENGTH, 0.12, 2, false);
statBoost(p, Skills.SKILL.DEFENCE, 0.10, 2, true);
statBoost(p, Skills.SKILL.HITPOINTS, 0.10, 20, true);
break;
case 22: //Saradomin brew potion. [Hitpoints +%15][Defense +25%][Strength, Attack, Magic and Ranged -10%]
statBoost(p, Skills.SKILL.HITPOINTS, 0.15, 0, false);
statBoost(p, Skills.SKILL.DEFENCE, 0.25, 0, false);
statBoost(p, Skills.SKILL.STRENGTH, 0.10, 0, true);
statBoost(p, Skills.SKILL.ATTACK, 0.10, 0, true);
statBoost(p, Skills.SKILL.MAGIC, 0.10, 0, true);
statBoost(p, Skills.SKILL.RANGE, 0.10, 0, true);
break;
}
p.setLastAnimation(new Animation(829));
p.getPackets().sendSkillLevels();
});
Server.registerEvent(drinkPotionEvent);
}