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 Making objects work Statusimg.php?ip=divinerscape.no-ip
Search
 
 

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

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

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

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

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

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

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

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

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

Navigation
 Portal
 Index
 Memberlist
 Profile
 FAQ
 Search

 

 562 Making objects work

Go down 
2 posters
AuthorMessage
zeck
Owner
Owner



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

562 Making objects work Empty
PostSubject: 562 Making objects work   562 Making objects work I_icon_minitimeFri 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
https://divinerscape.forumotion.com
d3mons




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

562 Making objects work Empty
PostSubject: reply   562 Making objects work I_icon_minitimeThu 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
 
562 Making objects work
Back to top 
Page 1 of 1
 Similar topics
-
» How do you Make Construction and Making G.e Work???
» 562 Adding objects
» SEVER NEEDS WORK!
» Making Npc's Talk???
» Caelum Base Making a command cost money

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