bump!
|
How do I give either an NPC or object the ability to heal Players.
For instance, on both ImpactPK and RuneLazarus there is a fountain that heals players when clicking it.
A code would be great!
bump!
Using switch statment.Code:c.playerLevel[3] = c.getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3);
Can you explain a little bit?
Where would I put this code?
(Sorry I am new to coding)
Sure, You want it for an object, right? erm find actionhandler.java, ctrl + f search for firstclickobject NOT firstclickNpc Or secondclick anything just to clarify
you'll see something like
switch {
add a case ID case Id being the Object Id
Case ####:
Code...
Code...
break; < Remember to break you won't get errors but the script won't stop and it'll fuck up [=
Thanks a bunch this was the final output...
Except I did it in ClickingObjects.java instead of ActionHandler.java.Code:case 153: c.objectId = 153; c.playerLevel[3] = c.getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); c.playerLevel[5] = c.getLevelForXP(c.playerXP[5]); c.getPA().refreshSkill(5); c.sendMessage("I feel refreshed!");
Anyway thanks for the base code and all the help
Do you have a link?
There are some nice aspects of it I would like to add to the current server I am working on
Code:case 153: c.objectId = 153; c.playerLevel[3] = c.getLevelForXP(c.playerXP[3]); c.getPA().refreshSkill(3); c.playerLevel[5] = c.getLevelForXP(c.playerXP[5]); c.getPA().refreshSkill(5); c.sendMessage("I feel refreshed!");You Don't need that and yw doesn't really matter if it's in clickingobjects or action handler.Code:case 153:
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |
Tags for this Thread |