當前位置: 首頁>>代碼示例>>C#>>正文


C# Player.setSuperAntipoisonCycles方法代碼示例

本文整理匯總了C#中RS2.Server.player.Player.setSuperAntipoisonCycles方法的典型用法代碼示例。如果您正苦於以下問題:C# Player.setSuperAntipoisonCycles方法的具體用法?C# Player.setSuperAntipoisonCycles怎麽用?C# Player.setSuperAntipoisonCycles使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在RS2.Server.player.Player的用法示例。


在下文中一共展示了Player.setSuperAntipoisonCycles方法的2個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。

示例1: 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;
開發者ID:ramatronics,項目名稱:rsps,代碼行數:67,代碼來源:Consumables.cs

示例2: 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();
     }
 }
開發者ID:ramatronics,項目名稱:rsps,代碼行數:36,代碼來源:FightPits.cs


注:本文中的RS2.Server.player.Player.setSuperAntipoisonCycles方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。