View Full Version : [REQ] NPC on player.gety-1
blancke
August 21st, 2011, 02:41
i'm trying to code the maxed cape as we speak but i need to find a way to spawn the npc in front of the player and how to make him do the emotes, i'm a pretty newb to coding so if someone could please help me! (already have all the player emotes and all the gfx , all i need is the npc emotes)
Thanks in advance,
Blancke
Mercenary
August 21st, 2011, 02:41
A thread similiar like this has been answered several minutes ago, please look before you post a thread.
blancke
August 21st, 2011, 02:43
A thread similiar like this has been answered several minutes ago, please look before you post a thread.
saw the thread but none of both worked xs, i'm pretty new to coding things i only know the basics of rs ps coding so yeah xs
Mercenary
August 21st, 2011, 02:48
Ermm..
Try experimenting with things..
Search for npc in the source and see what you can get out of it..
It learns you a lot.
Roxas
August 21st, 2011, 02:58
Try using the help section, this is for config
hellman2741
August 21st, 2011, 03:14
NPC npc = new NPC(1224);
npc.readResolve();
npc.setLocation(Location.location(player.getLocati on().getX(), player.getLocation().getY()-1, player.getLocation().getZ()));
All I'm giving you.
Mercenary
August 21st, 2011, 03:17
NPC npc = new NPC(1224);
npc.readResolve();
npc.setLocation(Location.location(player.getLocati on().getX(), player.getLocation().getY()-1, player.getLocation().getZ()));
All I'm giving you.
It's all that he needs lol..
hellman2741
August 21st, 2011, 04:03
It's all that he needs lol..
I meant, all from the emote.
Doesn't mean he can still code it.
Mercenary
August 21st, 2011, 04:18
I meant, all from the emote.
Doesn't mean he can still code it.
As far as I know what's left is a lot of delays that have to be created and sync every single thing.
It's not that hard to do to add the thing, just a little tricky to actually make it sync, make the npc do animations and don't let it disappear too early lelele.
blancke
August 21st, 2011, 11:58
NPC npc = new NPC(1224);
npc.readResolve();
npc.setLocation(Location.location(player.getLocati on().getX(), player.getLocation().getY()-1, player.getLocation().getZ()));
All I'm giving you.
all i needed thx
Borteritis
August 21st, 2011, 12:15
Nope,goodluck!
blancke
August 21st, 2011, 13:01
all i needed thx
added it , no error but npc doesnt spawn xs
Intensive Tony
August 21st, 2011, 14:44
NPC npc = new NPC(1224);
npc.readResolve();
npc.setLocation(Location.location(getLocation().ge tX(), getLocation().getY()-1, getLocation().getZ()));
World.getInstance().getNpcList().add(npc);
public void unregister(NPC n) {
npcs.remove(n);
}
public void register(NPC n) {
npcs.add(n);
}
blancke
August 21st, 2011, 15:04
NPC npc = new NPC(1224);
npc.readResolve();
npc.setLocation(Location.location(getLocation().ge tX(), getLocation().getY()-1, getLocation().getZ()));
World.getInstance().getNpcList().add(npc);
public void unregister(NPC n) {
npcs.remove(n);
}
public void register(NPC n) {
npcs.add(n);
}
thx :D
blancke
August 21st, 2011, 19:52
also how to make the npc animate ? i use npc.animate no errors but no emote also xs
titandino
August 21st, 2011, 21:52
NPC npc = new NPC(1224);
npc.readResolve();
npc.setLocation(Location.location(player.getLocati on().getX(), player.getLocation().getY()-1, player.getLocation().getZ()));
All I'm giving you.
This doesn't work ALL the time. It can cause some issues with the events and shit. Server nulls if you try to spawn that at the start of the eventhandler and use it throughout the emote.
Powered by vBulletin® Version 4.1.9 Copyright © 2012 vBulletin Solutions, Inc. All rights reserved.