Divinerscape

Divinerscape beta 562 And 508
 
HomeCalendarGalleryFAQSearchMemberlistUsergroupsRegisterLog in
Search
 
 

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

» Autodata 3.38 Suomi Torrent
Tue Feb 18, 2014 3:35 am by chaunnef

» Los Reyes De Arranque Puro Pinche Party Rar
Fri Feb 14, 2014 5:51 pm by chaunnef

» SEVER NEEDS WORK!
Sat Jun 16, 2012 11:48 am by mosf1415

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

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

» Making Npc's Talk???
Sat Aug 14, 2010 6:02 am by Jimmy300114

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

» omfg put the server on!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Thu Aug 12, 2010 4:30 am by d3mons

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

Share | 
 

 562 Making objects work

Go down 
AuthorMessage
zeck
Owner
Owner


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

PostSubject: 562 Making objects work   Fri Apr 30, 2010 4:11 pm

Alright first you want your object that you want to work to tele someone/ give an item to someone.

-EXAMPLE SOUL WARS PORTAL. -- \src\com\rs2hd\packethandler\Object1PacketHandler

Code:

  case 42219://Enter Soul Wars Lobby
  player.tele(1886, 3178 , 0);
  player.WalkTo().GoTo(player, x, y-1);
  break;


CASE 42219 IS OBJECT PLAYER.TELE IS when you click it it will tele you somewhere
where the coords are placed.

Now making an object so that when you click it it will respond to you with an item (very helpful if you want to make a special area click on the chest for items)

Code:

  case 42024: //Red Bandage table
  player.getInventory().addItem(4049, 1);
  break;

CASE 42024 IS THE OBJECT ID AGAIN -  and its red bandage table. And
player.getinventory().additem(ITEM ID HERE, AMOUNT); there.

I hope this helped you on making objects tele-able or pickable for items.
Back to top Go down
View user profile http://divinerscape.forumotion.com
d3mons



Posts : 2
Reputation : 0
Join date : 2010-08-12

PostSubject: reply   Thu Aug 12, 2010 4:26 am

well u covered a basic thing,but how about details such as which team the player is on,u still have to declare in players java variables for these things,and make them return as true when u start the game as a specfic team.and as for the bone praying and all that other stuff,just declare booleans and use the coords x to x and y to y to create the areas for obelisk and grave,so u can just use a code a if method,and do somthing like for itemselect

case(itemidhere):
If (p.booleanmethodhere && p.(teamvariablehere = true) {
===effect would go over here,including the animation,effect on the lvl of avatar ,etc which u have to set string for,seperatly,but alll info here.
it would be better iuf u delcared are void an did somthing like this.

p.VOIDHERE(p);

then after the info u wanna make it so it closes and u declare if a player burys a bone otherwise. it would go somthing ike this

} else {
i--------------------what u want the bone to do ,if player is else
where.like anywhere else.

then after that close the case with a

}
break;

that was just a basic exsample,hopes this helps.
Back to top Go down
View user profile
 
562 Making objects work
Back to top 
Page 1 of 1
 Similar topics
-
» Hot Toys making Indiana Jones figures, hints at Star Wars as well...
» release dates. how do they work (for the wii)
» polar express graphic
» how to get one muxxu Account back after getting banned. (no Garantee!)
» Can't log in on firefox browser

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