Skip to content

Instantly share code, notes, and snippets.

@u3games
Created August 2, 2013 16:39
Show Gist options
  • Save u3games/6141356 to your computer and use it in GitHub Desktop.
Save u3games/6141356 to your computer and use it in GitHub Desktop.
GiftOfVitality (add new case custom for user Vip)
Index: dist/game/data/scripts/events/GiftOfVitality/GiftOfVitality.java
===================================================================
--- dist/game/data/scripts/events/GiftOfVitality/GiftOfVitality.java (revision 9817)
+++ dist/game/data/scripts/events/GiftOfVitality/GiftOfVitality.java (working copy)
@@ -35,6 +35,8 @@
{
// NPC
private static final int STEVE_SHYAGEL = 4306;
+ // Item
+ private static final int ITEM_VIP = 6673; // Festival Adena
// Skills
private static final SkillHolder GIFT_OF_VITALITY = new SkillHolder(23179, 1);
private static final SkillHolder JOY_OF_VITALITY = new SkillHolder(23180, 1);
@@ -165,6 +167,20 @@
}
break;
}
+ case "vitality_vip":
+ {
+ if (st.hasQuestItems(ITEM_VIP))
+ {
+ st.takeItems(ITEM_VIP, 1); // If you dont want remove item just delete this line :)
+ player.doCast(GIFT_OF_VITALITY.getSkill());
+ player.doCast(JOY_OF_VITALITY.getSkill());
+ htmltext = "4306-okvitalityvip.htm";
+ }
+ else
+ {
+ player.sendMessage("You dont have VIP item!");
+ }
+ }
+ break;
}
return htmltext;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment