Code:
package com.rs.game.player.dialogues.interfaces.panel;
import com.rs.game.player.dialogues.Dialogue;
import com.rs.utils.ShopsHandler;
public class MemberShipD extends Dialogue {
//Begin van de dialogue
@Override
public void start() {
stage = 1;
if (stage == 1) {
sendOptionsDialogue("Power token manager", "What are these tokens?", "Power armor store", "Power weapons store");
stage = 2;
}
}
@Override
public void run(int interfaceId, int componentId) {
if (stage == 2) {
if(componentId == OPTION_1){
sendNpc(14392,"You will gain these tokens over time, you can use them to purchase some of the strongest gear availible.");
stage = 3;
}
else if(componentId == OPTION_2){
if(player.isAtHome()){
ShopsHandler.openShop(player,152);
end();
}
else if(componentId == OPTION_3) {
if(player.isAtHome()) {
ShopsHandler.openShop(player,153);
end();
}
}else
player.sm("You need to be at home to open this shop.");
}
}
else if (stage == 3){
sendOptionsDialogue("Power token manager", "What are these tokens?", "Power armor store", "Power weapons store");
stage = 2;
}
}
@Override
public void finish() {
// TODO Auto-generated method stub
}
}