Divinerscape
Would you like to react to this message? Create an account in a few clicks or log in to continue.

Divinerscape

Divinerscape beta 562 And 508
 
HomeGalleryLatest imagesSearchRegisterLog in
562 Adding objects Statusimg.php?ip=divinerscape.no-ip
Search
 
 

Display results as :
 
Rechercher Advanced Search
Latest topics
» Dota 6.78 Ai
562 Adding objects I_icon_minitimeTue Feb 18, 2014 5:14 am by chaunnef

» Autodata 3.38 Suomi Torrent
562 Adding objects I_icon_minitimeTue Feb 18, 2014 3:35 am by chaunnef

» Los Reyes De Arranque Puro Pinche Party Rar
562 Adding objects I_icon_minitimeFri Feb 14, 2014 5:51 pm by chaunnef

» SEVER NEEDS WORK!
562 Adding objects I_icon_minitimeSat Jun 16, 2012 11:48 am by mosf1415

» Keep spawning at falador??? when login with a new account
562 Adding objects I_icon_minitimeMon Aug 16, 2010 8:22 am by Jimmy300114

» How to Add Costum items (like agile and H'ween stuff)
562 Adding objects I_icon_minitimeSat Aug 14, 2010 8:35 am by Jimmy300114

» Making Npc's Talk???
562 Adding objects I_icon_minitimeSat Aug 14, 2010 6:02 am by Jimmy300114

» How do you Make Construction and Making G.e Work???
562 Adding objects I_icon_minitimeSat Aug 14, 2010 5:31 am by Jimmy300114

» omfg put the server on!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
562 Adding objects I_icon_minitimeThu Aug 12, 2010 4:30 am by d3mons

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

 

 562 Adding objects

Go down 
AuthorMessage
zeck
Owner
Owner



Posts : 27
Reputation : 3
Join date : 2010-01-17
Age : 33
Location : Florida

562 Adding objects Empty
PostSubject: 562 Adding objects   562 Adding objects I_icon_minitimeFri Apr 30, 2010 3:44 pm

Step 1:
Open your source folder

Step 2:
Go here: src\com\rs2hd\net\ActionSender.java

Step 3:
Search
Quote :

player.getActionSender().sendCreateObject

you will see this void:

Code:

   public void sendMapRegion() {
   try {
      if(!validateMapRegion()) {
         player.getActionSender().sendMessage("This area of the world is unavailable, teleporting to spawn point...");
         player.setLocation(Entity.DEFAULT_LOCATION);
      }
      StaticPacketBuilder spb = new StaticPacketBuilder().setId(76).setSize(Packet.Size.VariableShort);
      boolean forceSend = true;
      spb.addLEShortA(player.getLocation().getRegionX());
      spb.addShort(player.getLocation().getLocalY());
      spb.addByte((byte) 0);
      spb.addByteA(0);
      if ((((player.getLocation().getRegionX() / 8) == 48) || ((player.getLocation().getRegionX() / 8) == 49)) && ((player.getLocation().getRegionY() / 8) == 48)) {
         forceSend = false;
      }
      if (((player.getLocation().getRegionX() / 8) == 48) && ((player.getLocation().getRegionY() / 8) == 148)) {
         forceSend = false;
      }
      for (int xCalc = (player.getLocation().getRegionX() - 6) / 8; xCalc <= ((player.getLocation().getRegionX() + 6) / 8); xCalc++) {
         for (int yCalc = (player.getLocation().getRegionY() - 6) / 8; yCalc <= ((player.getLocation().getRegionY() + 6) / 8); yCalc++) {
            int region = yCalc + (xCalc << 8); // 1786653352
            if (forceSend || ((yCalc != 49) && (yCalc != 149) && (yCalc != 147) && (xCalc != 50) && ((xCalc != 49) || (yCalc != 47)))) {
               int[] mapData = World.getInstance().getMapData(region);
               if(mapData == null) {
                  mapData = new int[4];
               }
               spb.addInt(mapData[0]);
               spb.addInt(mapData[1]);
               spb.addInt(mapData[2]);
               spb.addInt(mapData[3]);
            }
         }
      }
      spb.addByteA(player.getLocation().getZ());
      spb.addShort(player.getLocation().getLocalX());
      spb.addShort(player.getLocation().getRegionY());
      player.getSession().write(spb.toPacket());
      player.getUpdateFlags().setLastRegion(player.getLocation());
      World.getInstance().getItemManager().refresh(player);
      World.getInstance().getObjectManager().refresh(player);
      if (player.getLocation().getZ() == 0) {
      player.getActionSender().sendCreateObject(409, 0, 3223, 3223, -2, 10);
        player.getActionSender().sendCreateObject(17010, 0, 2141, 3943, -1, 10);
      player.getActionSender().sendCreateObject(2560, 0, 3226, 3215, -1, 10);
      player.getActionSender().sendCreateObject(2562, 0, 3226, 3225, -1, 10);
      player.getActionSender().sendCreateObject(2213, 0, 3227, 3218, -1, 10);
      player.getActionSender().sendCreateObject(409, 0, 2902, 4410, -2, 10);
GameEngine.TreeLive.treesCheck(player);
GameEngine.RockLive.rocksCheck(player);
GameEngine.StallLive.stallsCheck(player);
http://player.RouteFinder().loadMap();
}
      } catch(Exception e) {
      }
   }
(Not all of my objects removed some of the good ones so no leechers)

Lets Explain what some of this does.
(OBJECT ID, 0, X COORD, Y COORD, Way it face, 10);
player.getActionSender().sendCreateObject(409, 0, 2902, 4410, -2, 10);

Alright

-2 means it going to face South
-1 means it going to face West
0 means it is going to face North [I believe]
1 Means it going for face East [I BELIEVE]

I have not tested 0 and 1 yet.

Save compile, Restart server and boom. Your object is created.

Thank you.
Back to top Go down
https://divinerscape.forumotion.com
 
562 Adding objects
Back to top 
Page 1 of 1
 Similar topics
-
» Adding soul wars to a 562.
» 562 Making objects work
» 562 rs2hd caelum's base adding shops
» Html Making a Webpage and adding a xbox Gamescore point

Permissions in this forum:You cannot reply to topics in this forum
Divinerscape :: Html, C++, Java, Server Tutorials-
Jump to: