people come on.. I gotten no help on anything
|
I am using emulous.
I have an avatar handler with 4 avatars. skeleton,mage,range and human.
Each avatar has their own area in the world.
I am wondering how do I make it if you walk into another avatars area you get poisoned.
Can some please explain to me or give me a code that will allow me to do that? Any help would be greatly appreciated.Code:Avatarhandler.Skeleton = 1 Avatarhandler.Mage = 1 Avatarhandler.Range = 1 Avatarhandler.Human = 1
Other:
This has nothing to do with what is above. But can someone please give me the sendquests for modern and ancient magics?
people come on.. I gotten no help on anything
Then in Walking or clicking packet;Code:public boolean otherWorld() { if( absX >= coords && absY >= coords && absX <= coords && absY <= coords) { return true; else return false; } }
Code:if(otherWorld() && !AvatarHandler.human == 1) { c.getPA().startTeleport(3232, 3232, "modern"); }
I made it teleport instead. Since Emulous does not having poison to start off with.
ok thanks for replying and that works instead of poison. But can you add a timer or something. So when they walk in they get a message saying your in the wrong place blah blah blah you will be teleported to blah in 20 seconds. Then 20 seconds pass and they get teleported some where.
Guess I'll give it to you on a silver platern ;P
Then in Walking or clicking packet;Code:public boolean otherWorld() { if( absX >= coords && absY >= coords && absX <= coords && absY <= coords) { return true; else return false; } }
DeclareCode:if(otherWorld() && !AvatarHandler.human == 1) { c.sendMessage("You are not in your world. You will be teleported in: "+tehTimer+" seconds"); tehTimer = 40; if(tehTimer == 2) { c.getPA().startTeleport(3232, 3232, "modern"); } }
Add to proccess or where ever othre place you see fit.Code:public int tehTimer = 0;
It's set to 40 because usually process is 500ms which means you have to x2 your timer. 20x2 = 40.Code:if(tehTimer > 0) { tehTimer -= 1; }
And then when it reaches 1 or 2 seconds left, it simply teleports you.
thank you sooo much it was a big help
No problem.
ok there is a slight problem. It never teleports. It just says the message every time you click to walk.
Where did you add
Code:if(tehTimer > 0) { tehTimer -= 1; }
in process in client.java and in walking.java i changed it to c.tehTimer
« Previous Thread | Next Thread » |
Thread Information |
Users Browsing this ThreadThere are currently 1 users browsing this thread. (0 members and 1 guests) |