something like thatCode: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); } }
|
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
something like thatCode: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); } }
ok so i made this
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[]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); } } }
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..."); }
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
Please Help ME
Code:if (UsedOnObjectID == 2638 && ItemID == 1704 || UsedOnObjectID == 2638 && ItemID == 1706 || UsedOnObjectID == 2638 && ItemID == 1708 || UsedOnObjectID == 2638 && ItemID == 1710 ){ chargeGlory(); }
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); } } }
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |