Advertisement
Guest User

Untitled

a guest
Oct 29th, 2019
35
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
Java 0.98 KB | None | 0 0
  1. package com.rs.game.player.content.holidayevents.christmas;
  2.  
  3. import com.rs.game.Animation;
  4. import com.rs.game.SpotAnim;
  5. import com.rs.game.player.content.dialogue.Dialogue;
  6. import com.rs.plugin.annotations.ItemClickHandler;
  7. import com.rs.plugin.annotations.PluginEventHandler;
  8. import com.rs.plugin.events.ItemClickEvent;
  9.  
  10. @PluginEventHandler
  11. public class Snowglobe {
  12.  
  13.     @ItemClickHandler(ids = { 11949 })
  14.     public static void handleSnowGlobe(ItemClickEvent e) {
  15.         e.getPlayer().setNextAnimation(new Animation(2926));
  16.         e.getPlayer().startConversation(new Dialogue().addNext(new Dialogue(p -> {
  17.             p.getInterfaceManager().sendInterface(659);
  18.             p.setCloseInterfacesEvent(() -> {
  19.                 e.getPlayer().setNextAnimation(new Animation(7538));
  20.             });
  21.         })).addNext(new Dialogue(p -> {
  22.             p.closeInterfaces();
  23.             p.setNextAnimation(new Animation(7528));
  24.             p.setNextSpotAnim(new SpotAnim(1284));
  25.             p.getInventory().addItem(11951, e.getPlayer().getInventory().getFreeSlots());
  26.         })));
  27.     }
  28. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement