Code-x

Code-x Private Server
 
HomeHome  PortalPortal  SearchSearch  RegisterRegister  Log inLog in  

 

 [TUT] glory teleport

Go down 
AuthorMessage
1xiix1
Donator
Donator


Number of posts : 87
Registration date : 2008-08-20

[TUT] glory teleport Empty
PostSubject: [TUT] glory teleport   [TUT] glory teleport Icon_minitimeThu Aug 21, 2008 2:32 pm

because you asked to post a tut, here it is (dodian based, since * source is dodian)

Step 1: Well, first lets add this in your voids: (its important to add teleports)

Code:
[i]
public void selectoption(String question, String s1, String s2, String s3)
{
sendFrame171(1, 2465);
sendFrame171(0, 2468);
sendFrame126(question, 2460);
sendFrame126(s1, 2461);
sendFrame126(s2, 2462);
sendFrame126(s3, 2463);
sendFrame164(2459);
}
[/i]

the above code, yea i don't know how to explain it that well. It makes 2 option that you can select just like this "select option" on npcs.

If you must know where to add just paste it above this code:

Code:
 [i]
   public void smelt(int id) {
      setAnimation(0x383);
      smelt_id = id;
      smelting = true;
      int smelt_barId = -1;
      ArrayList<Integer> removed = new ArrayList<Integer>();
      if (smeltCount < 1) {
         resetAction(true);
         return;
      }
      smeltCount--;
      switch (id) {
      case 2349:
         // bronze
         if (playerHasItem(436) && playerHasItem(438)) {
            smelt_barId = 2349;
            removed.add(436);
            removed.add(438);
         }
         break;
[/i]


Step 2: Now, look for (packet 75) also known as (case 75:) once you find it deleted the hole packet. and replace it with this code:

Code:
[i]
case 75:

int itemid = inStream.readSignedWordA();
int item2ID = inStream.readSignedWordBigEndian();
int item2ID3 = inStream.readSignedWordA();
int item2ID4 = inStream.readUnsignedWord();
println("Item2ID: "+item2ID);
println("Item2ID3: "+item2ID3);
println("Item2ID4: "+item2ID4);


if (item2ID3 == 1712 || (item2ID3 == 1710) || (item2ID3 == 1708) ||(item2ID3 == 1706)) {
if (isInWilderness == true)  {
sendMessage("You can only operate glory when you are in a safezone !");
} else if (isInWilderness == false) {
glory = true;
selectoption("Where do you want to go?", "Jad/Chaos Elemental", "Prize Center", "");
}
}
break;
[/i]

Now, what this does it make it so when you click the glory's "rub" option, it will show the interface. (Its for all the glorys. expect for the uncharged 1.
explanation of each line:

item2id3 = itemid
if (isInWilderness == true) = if you are in the wilderness if wont work.
sendMessage = server saying cant use this in wildy.
glory = true, is a command for the teleport.
selectoption, is self explanatory.


Step 3: Now, this step, we go down to packet 9157 (case 9157)
We add this code right under the case 1957:


Code:
[i]
if (glory) {
if (playerHasItem(1712)) {
teleportToX = 3422;
teleportToY = 3567;
heightLevel = 2;
deleteItem(1712, getItemSlot(1712), 1);
addItem(1710, 1);
glory = false;
RemoveAllWindows();
} else if (playerHasItem(1710)) {
teleportToX = 3422;
teleportToY = 3567;
heightLevel = 2;
deleteItem(1710, getItemSlot(1710), 1);
addItem(1708, 1);
glory = false;
RemoveAllWindows();
} else if (playerHasItem(1708)) {
teleportToX = 3422;
teleportToY = 3567;
heightLevel = 2;
deleteItem(1708, getItemSlot(1708), 1);
addItem(1706, 1);
glory = false;
RemoveAllWindows();
} else if (playerHasItem(1706)) {
teleportToX = 3422;
teleportToY = 3567;
heightLevel = 2;
deleteItem(1706, getItemSlot(1706), 1);
addItem(1704, 1);
glory = false;
RemoveAllWindows();
}
}
[/i]

and we also do this for packet 9158: (case 1958) copy&paste:

Code:
[i]
if (glory) {
if (playerHasItem(1712)) {
teleportToX = 2892;
teleportToY = 9826;
heightLevel = 0;
deleteItem(1712, getItemSlot(1712), 1);
addItem(1710, 1);
glory = false;
RemoveAllWindows();
} else if (playerHasItem(1710)) {
teleportToX = 2892;
teleportToY = 9826;
heightLevel = 0;
deleteItem(1710, getItemSlot(1710), 1);
deleteItem(1708, 1);
addItem(1708, 1);
glory = false;
RemoveAllWindows();
} else if (playerHasItem(1708)) {
teleportToX = 2892;
teleportToY = 9826;
heightLevel = 0;
deleteItem(1708, getItemSlot(1708), 1);
addItem(1706, 1);
glory = false;
RemoveAllWindows();
} else if (playerHasItem(1706)) {
teleportToX = 2892;
teleportToY = 9826;
heightLevel = 0;
deleteItem(1706, getItemSlot(1706), 1);
addItem(1704, 1);
glory = false;
RemoveAllWindows();
}
}
[/i]

explanation:
I'll use this piece of the code for the Explaination for the hole 2 codes above:
Code:
 [i]
} else if (playerHasItem(1706)) {
teleportToX = 2892;
teleportToY = 9826;
heightLevel = 0;
deleteItem(1706, getItemSlot(1706), 1);
addItem(1704, 1);
glory = false;
RemoveAllWindows();
}




OK, first line
} else if (playerHasItem(1706)) { == if you have item 1706 and use it this is what will happen:

teleporttox (coord)
teleporttoy (coord)
(all 9157's are the same)
&
(all the 9158's are the same)

heightlevel(the height you want)
then we go on and add

deleteItem(1706, getItemSlot(1706), 1);
this will delete your 1706

addItem(1704, 1);
this will add the lower level glory.

glory = false;
this tells server to turn off glory.

RemoveAllWindows();
just mean remove the interface.

this explains for all the tells (9157 = first option) (9158 = 2nd option)


Step 4: Now, go upto the top of the client and look for
Code:
 public int attackedNpcId = -1;
Then under that add this code:


Code:
public boolean glory = false;

[SIZE="3"]Totally differnt tut:[/SIZE]

This is to charge up your glory:
a couple of codes look for:
Code:
[i]
if ((UsedOnObjectID == 5917))
[/i]

Then add this under it:

Code:
[i]
if ((UsedOnObjectID == 2638))
      if (playerHasItem(1706)) {
         deleteItem(1706, 1);
         addItem(1712, 1);
      } if (playerHasItem(1708)) {
         deleteItem(1708, 1);
         addItem(1712, 1);
      } if (playerHasItem(1710)) {
         deleteItem(1710, 1);
         addItem(1712, 1);
      } if (playerHasItem(1704)) {
         deleteItem(1704, 1);
         addItem(1712, 1);
      }
[/i]
that recharges the glory to 4.
its the Hero Guild's fountain. where you recharge
Back to top Go down
Cookie
Donator
Donator
Cookie

Number of posts : 306
Age : 111
Location : null
Registration date : 2008-08-12

[TUT] glory teleport Empty
PostSubject: Re: [TUT] glory teleport   [TUT] glory teleport Icon_minitimeSat Aug 23, 2008 7:27 pm

Well... Good guide.. But I don't get it lol Razz

Am I stupid now? What a Face
Back to top Go down
http://runescape.com
m33p0rz3r
Global Moderator
Global Moderator
m33p0rz3r

Number of posts : 445
Age : 24
Location : Ohio.
Registration date : 2008-06-04

[TUT] glory teleport Empty
PostSubject: Re: [TUT] glory teleport   [TUT] glory teleport Icon_minitimeSat Aug 23, 2008 7:29 pm

umm u dont even know wat the guide does to glory.. u just posting good guide...
Back to top Go down
http://www.GamersChoice.darkbb.com
Cookie
Donator
Donator
Cookie

Number of posts : 306
Age : 111
Location : null
Registration date : 2008-08-12

[TUT] glory teleport Empty
PostSubject: Re: [TUT] glory teleport   [TUT] glory teleport Icon_minitimeSat Aug 23, 2008 7:45 pm

Well it might be good, because he posted more good things xD
Back to top Go down
http://runescape.com
Sponsored content




[TUT] glory teleport Empty
PostSubject: Re: [TUT] glory teleport   [TUT] glory teleport Icon_minitime

Back to top Go down
 
[TUT] glory teleport
Back to top 
Page 1 of 1
 Similar topics
-
» Teleport - Divide your map(s)!

Permissions in this forum:You cannot reply to topics in this forum
Code-x :: Server Chat :: suggestions-
Jump to: