Thread: Recharging glorys [Delta]

Results 1 to 7 of 7
  1. #1 Recharging glorys [Delta] 
    Registered Member
    Join Date
    May 2012
    Posts
    111
    Thanks given
    10
    Thanks received
    3
    Rep Power
    9
    i made my glorys send frame on rub and able to tele and now im working on item on object to recharge them and wondering how i would get it to take all glory(0-4) and add back how many it took out with glory(4) i have the object id and have it working but i dont have the ability to look for glory and replace them can any one help
    Reply With Quote  
     

  2. #2  
    Registered Member
    Join Date
    Jun 2011
    Posts
    220
    Thanks given
    3
    Thanks received
    13
    Rep Power
    2
    Code:
    int[] gloryIDs = {...}; //0-3
    int glory4
    for(int i = 0; i < gloryIDs.length; i++) {
        while(c.getItems().playerHasItem(gloryIDs[i], 1) {
            c.getItems().deleteItem(gloryIDs[i]i, 1);
            c.getItems().addItem(glory4, 1);
        }
    }
    something like that
    Reply With Quote  
     

  3. #3  
    Registered Member
    Join Date
    May 2012
    Posts
    111
    Thanks given
    10
    Thanks received
    3
    Rep Power
    9
    ok so i made this

    Code:
    	public void chargeGlory(){
    		int UsedOnObjectID = inStream.readUnsignedWordBigEndian();
    		int[] gloryIDs = { 1704, 1706, 1708, 1710 }; //0-3
    		for(int i = 0; i < gloryIDs.length; i++) {
    			while(UsedOnObjectID == 2638 && playerHasItem(gloryIDs[i], 1)){
    				  deleteItem(gloryIDs[i], 1);
    				  addItem(1712, 1);
    			}
    		}
    	}
    and it compiles right but when i use a id on obj it wont do anythign and im thinking it something to do with use on obj and also would i need to make a new void like i did here for the int[]

    before i had this in case 192: and it worked ok but takes a lot of room and is messy

    Code:
    if (UsedOnObjectID == 2638 && ItemID == 1704){
    		faceNPC(UsedOnObjectID);
            TurnPlayerTo(UsedOnX, UsedOnY);
            deleteItem(1704, getItemSlot(1704));
    		addItem(1712 , 1);
    		sM("You dip the amulet in the fountain...");
    } else if (UsedOnObjectID == 2638 && ItemID == 1706){
    		faceNPC(UsedOnObjectID);
            TurnPlayerTo(UsedOnX, UsedOnY);
            deleteItem(1706, getItemSlot(1708));
    		addItem(1712 , 1);
    		sM("You dip the amulet in the fountain...");
    } else if (UsedOnObjectID == 2638 && ItemID == 1708){
    		faceNPC(UsedOnObjectID);
            TurnPlayerTo(UsedOnX, UsedOnY);
            deleteItem(1708, getItemSlot(1708));
    		addItem(1712 , 1);
    		sM("You dip the amulet in the fountain...");
    } else if (UsedOnObjectID == 2638 && ItemID == 1710){
    		faceNPC(UsedOnObjectID);
            TurnPlayerTo(UsedOnX, UsedOnY);
            deleteItem(1710, getItemSlot(1710));
    		addItem(1712 , 1);
    		sM("You dip the amulet in the fountain...");
    }
    Reply With Quote  
     

  4. #4  
    Registered Member
    Join Date
    May 2012
    Posts
    111
    Thanks given
    10
    Thanks received
    3
    Rep Power
    9
    Bump i have a working model atm but it only does one at a time anyone know how to make this work
    also wondered if any on has a idea on emote # for diping glory in fountain
    Reply With Quote  
     

  5. #5  
    Registered Member
    Join Date
    May 2012
    Posts
    111
    Thanks given
    10
    Thanks received
    3
    Rep Power
    9
    Please Help ME
    Reply With Quote  
     

  6. #6  
    Registered Member Bs Zilla's Avatar
    Join Date
    Jul 2012
    Posts
    39
    Thanks given
    1
    Thanks received
    5
    Rep Power
    12
    Code:
    if (UsedOnObjectID == 2638 && ItemID == 1704 || UsedOnObjectID == 2638 && ItemID == 1706 || UsedOnObjectID == 2638 && ItemID == 1708 || UsedOnObjectID == 2638 && ItemID == 1710 ){
    chargeGlory();
    }
    Reply With Quote  
     

  7. #7  
    Registered Member
    Join Date
    May 2012
    Posts
    111
    Thanks given
    10
    Thanks received
    3
    Rep Power
    9
    ok i finally got it working if any one wants it here it is thank you ch3ck it s0n for the code and bs zilla for that lil bit of useonobj and item line didn't have to write it all out and then to my self for finally smarting up and putting it all together

    Code:
    under case 192: (delta)
    //glory recharge
    int[] gloryIDs = { 1704, 1706, 1708, 1710 }; //0-3
    if (UsedOnObjectID == 2638 && ItemID == 1704 ||
    	UsedOnObjectID == 2638 && ItemID == 1706 ||
    	UsedOnObjectID == 2638 && ItemID == 1708 ||
    	UsedOnObjectID == 2638 && ItemID == 1710 ){
    	for(int i = 0; i < gloryIDs.length; i++) {
    		while(playerHasItem(gloryIDs[i], 1)){
    			deleteItem(gloryIDs[i], 1);
    			addItem(1712, 1);
    		}
    	}
    }
    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. Replies: 12
    Last Post: 03-20-2012, 11:52 PM
  2. Replies: 5
    Last Post: 08-12-2010, 04:29 PM
  3. adding special draining and recharging
    By ROYALE. in forum Tutorials
    Replies: 38
    Last Post: 07-10-2010, 02:10 PM
  4. [delta] make glorys to tele
    By George in forum Requests
    Replies: 3
    Last Post: 04-25-2009, 06:25 PM
Posting Permissions
  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •