Thread: PI Spawning in Quest tab

Results 1 to 5 of 5
  1. #1 PI Spawning in Quest tab 
    Registered Member
    Join Date
    Jul 2012
    Posts
    120
    Thanks given
    2
    Thanks received
    5
    Rep Power
    11
    Hey so im making a spawn server and i want to have spawning via quest tab, i was wondering in clicking buttons is it possible when the player clicks say "maxed main" they will get all the Armour put on a full inventory of food pots etc, change spellbook and set stats, is this possible? if so can somebody point me in right direction. Thanks.
    Reply With Quote  
     

  2. #2  
    Registered Member Lil Peep's Avatar
    Join Date
    Oct 2012
    Posts
    881
    Thanks given
    234
    Thanks received
    58
    Rep Power
    0
    click on the line in quest tab to get the action button id. Then make a case such as this:

    Code:
    case ID of ActionButton:
    if (c.inWild()) // Players cannot use this in wild
    return;
    c.getItems().addItem(ITEM ID, AMOUNT); // Used to spawn an item
    c.getPA().addSkillXP(14000000, 0); // 14000000 = XP & 0 = Skill id. Max stats would be using skill id's 1-6
    c.getPA().refreshSkill(0); // Updates the skill you set. 
    break;
    Obviousy you need to configure the above to your needs.

    Also, idk what spellbook you want to switch so heres a command you can rip the contents from, or use.
    Code:
    if (playerCommand.startsWith("switch")) { // ::switch 0, ::switch 1, ::switch 2
    				if (c.inWild())
    					return;
    				try {
    				String[] args = playerCommand.split(" ");
    				int spellbook = Integer.parseInt(args[1]);
    				if (spellbook == 0) { 
    					c.setSidebarInterface(6, 1151);
    					c.playerMagicBook = 0;
    					c.autocastId = -1;
    					c.getPA().resetAutocast();
    				} else if (spellbook == 1) {
    					c.setSidebarInterface(6, 12855);
    					c.playerMagicBook = 1;
    					c.autocastId = -1;
    					c.getPA().resetAutocast();
    				} else if (spellbook == 2) {
    					c.setSidebarInterface(6, 29999);
    					c.playerMagicBook = 2;
    					c.autocastId = -1;
    					c.getPA().resetAutocast();
    				}
    				} catch (Exception e){}
    			}
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    Jul 2012
    Posts
    120
    Thanks given
    2
    Thanks received
    5
    Rep Power
    11
    Quote Originally Posted by stormrunner View Post
    click on the line in quest tab to get the action button id. Then make a case such as this:

    Code:
    case ID of ActionButton:
    if (c.inWild()) // Players cannot use this in wild
    return;
    c.getItems().addItem(ITEM ID, AMOUNT); // Used to spawn an item
    c.getPA().addSkillXP(14000000, 0); // 14000000 = XP & 0 = Skill id. Max stats would be using skill id's 1-6
    c.getPA().refreshSkill(0); // Updates the skill you set. 
    break;
    Obviousy you need to configure the above to your needs.

    Also, idk what spellbook you want to switch so heres a command you can rip the contents from, or use.
    Code:
    if (playerCommand.startsWith("switch")) { // ::switch 0, ::switch 1, ::switch 2
    				if (c.inWild())
    					return;
    				try {
    				String[] args = playerCommand.split(" ");
    				int spellbook = Integer.parseInt(args[1]);
    				if (spellbook == 0) { 
    					c.setSidebarInterface(6, 1151);
    					c.playerMagicBook = 0;
    					c.autocastId = -1;
    					c.getPA().resetAutocast();
    				} else if (spellbook == 1) {
    					c.setSidebarInterface(6, 12855);
    					c.playerMagicBook = 1;
    					c.autocastId = -1;
    					c.getPA().resetAutocast();
    				} else if (spellbook == 2) {
    					c.setSidebarInterface(6, 29999);
    					c.playerMagicBook = 2;
    					c.autocastId = -1;
    					c.getPA().resetAutocast();
    				}
    				} catch (Exception e){}
    			}
    Thanks dude that explains everything apart from how to make the item spawn onto the player like actually in the equipment tab
    Reply With Quote  
     

  4. #4  
    Banned

    Join Date
    Feb 2014
    Posts
    1,204
    Thanks given
    138
    Thanks received
    450
    Rep Power
    0
    Code:
    case Button ID:
    			StarterInterface.main(c);
    			break;

    Code:
    package wind.model.players.content;
    
    import wind.model.players.Client;
    
    public class StarterInterface {
    
    	public static void main(final Client c) {
    			int itemsToAdd[] = { 2440, 2436, 2442, 3024, 5680, 385}; //items in inventrory
    			for (int i = 0; i < itemsToAdd.length; i++) {
    				c.getItems().addItem(itemsToAdd[i], 1);
    				c.sendMessage("You spawned Melee Gear.");
    			}
    			int[] equip = { 10828, 6570, 6585, 4151, 1127, 8850, -1, 1079, -1,
    					7462, 11840, 2550, -1, -1 }; //items equipped
    			for (int i = 0; i < equip.length; i++) {
    				c.playerEquipment[i] = equip[i];
    				c.playerEquipment[i] = 1;
    				c.getItems().setEquipment(equip[i], 1, i);
    			}
    	}
    Reply With Quote  
     

  5. #5  
    Registered Member Lil Peep's Avatar
    Join Date
    Oct 2012
    Posts
    881
    Thanks given
    234
    Thanks received
    58
    Rep Power
    0
    Quote Originally Posted by Paragraph View Post
    Thanks dude that explains everything apart from how to make the item spawn onto the player like actually in the equipment tab
    HAT = 0, CAPE = 1, AMULET = 2, WEAPON = 3, BODY = 4, SHIELD = 5,
    * LEGS = 7, GLOVES = 9, BOOTS = 10, RING = 12, ARROWS = 13
    Code:
    c.playerEquipment[0] = HELMET ID;
    		c.playerEquipment[1] = CAPE ID;
    		c.playerEquipment[2] = AMULET ID;
    		c.playerEquipment[3] = WEAPON ID;
    		c.playerEquipment[4] = BODY ID;
    		c.playerEquipment[5] = SHIELD ID;
    		c.playerEquipment[7] = LEGS ID;
    c.playerEquipment[9] = GLOVES ID;
    c.playerEquipment[10] = BOOTS ID;
    c.playerEquipment[12] = RING ID;
    c.playerEquipment[12] = ARROW ID;
    
    		c.playerEquipment[10] = ;
    Reply With Quote  
     


Thread Information
Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)


User Tag List

Similar Threads

  1. [Pi] Vote in Quest Tab [server sided]
    By Zerk3r in forum Snippets
    Replies: 13
    Last Post: 07-19-2012, 09:41 PM
  2. Replies: 0
    Last Post: 01-05-2012, 04:03 PM
  3. [PI] Items in Quest tab (Taking all Money?)
    By Rockstar Jax in forum Help
    Replies: 3
    Last Post: 05-06-2011, 11:58 PM
  4. [PI] Players online in quest tab
    By Arithium in forum Snippets
    Replies: 14
    Last Post: 09-27-2010, 07:44 PM
  5. [PI] Players Online in Quest tab Update
    By Harambe_ in forum Help
    Replies: 3
    Last Post: 09-17-2010, 05:29 AM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •