I have a question. I want to know if anyone can (maybe) give me a tip/hint/piece of code as in how to make an NPC teleport to random coords. once you click on an option of the npc.
I have no idea as in how to do this since I just came back from a very long trip and I'm exhausted.
I saw that Elite-Co has something VERY similar to this but I have NO idea on how to convert it.
case [COLOR="Red"]YOUR NPC ID[/COLOR]:
{
switch (npcRequest.OptionID)
{
case 0:
{
dialog.Text("[COLOR="Red"]I can teleport you to TC (might be wrong coords)[/COLOR]");
dialog.Link("[COLOR="#ff0000"]Go ahead.[/COLOR]", 1);
dialog.Link("[COLOR="#ff0000"]No thanks.[/COLOR]", 255);
dialog.Send();
break;
}
case 1:
{
if (client.Entity.[COLOR="#ff0000"]ConquerPoints[/COLOR] >= [COLOR="#ff0000"]1[/COLOR])
{
client.Entity.[COLOR="#ff0000"]ConquerPoints[/COLOR] -= [COLOR="#ff0000"]1[/COLOR];
client.Entity.Teleport([COLOR="#ff0000"]1002[/COLOR], [COLOR="#ff0000"]300[/COLOR], [COLOR="#ff0000"]330[/COLOR]);
}
else
{
dialog.Text("[COLOR="#ff0000"]Not enough cash![/COLOR]");
dialog.Link("[COLOR="#ff0000"]Ok bye.[/COLOR]", 255);
dialog.Avatar(144);
dialog.Send();
}
break;
}
}
YOUR NPC ID = Put your NPC ID.
1002 = ID of the map.
300 = X coordinate.
330 = Y coordinate.
ConquerPoints, you could change this with Money, so the player will pay silvers instead of cps.
NOTE: CHANGE THE RED WORDS AS YOU LIKE!
if he made it like this , thats mean that the NPC will send him to a Specific place , he wants it something like that ("He define 10 coords(x,y) and the npc choose the coords randomly , so it's kinda like the "AutoInvite" not all the players teleporting to the same coordinates, but they all teleport to the same map. I guess that what he ment though!
I think he wants to have the NPC move, not his char.
It's really not hard at all but the issue with everyone using public sources is that they are completely unaware of how the core systems work such as the map system.
You need to...
1: remove the npc from map (if the map system is good it despawns on .remove else send gendat 135 I think to remove entity from player screens.)
2: pick a random valid coord. This can either be a db or w/e of pre recorded points or you could do a fully random system where it rolls a random number and checks dmap validity (if not valid pull new coords)
3: insert npc at new point on map. Again if a good map system it will send spawn packets to locals else do it yourself.
Boom, npc is now in a new place. I assume you want this for a hunting quest. You could try searching I posted a super old quest for coemu doing this as one of my early coding attempts.
I think he wants to have the NPC move, not his char.
It's really not hard at all but the issue with everyone using public sources is that they are completely unaware of how the core systems work such as the map system.
You need to...
1: remove the npc from map (if the map system is good it despawns on .remove else send gendat 135 I think to remove entity from player screens.)
2: pick a random valid coord. This can either be a db or w/e of pre recorded points or you could do a fully random system where it rolls a random number and checks dmap validity (if not valid pull new coords)
3: insert npc at new point on map. Again if a good map system it will send spawn packets to locals else do it yourself.
Boom, npc is now in a new place. I assume you want this for a hunting quest. You could try searching I posted a super old quest for coemu doing this as one of my early coding attempts.
Simply manually send the despawn code, normally around Screen.cs and also send that despawn to clients that would've been able to see the npc.
So the npc is gone?
Respawn it!
Find some valid coords, What i'd do if I were doing Richard is, Get about 5 Places for him to goto, do a random, if unable to access the spot, +1+1 to X and Y if still not possible try adding one more X, if STILL not accessable then I'd simply make a new random of the spots and repeat untill its found something.
You then need to simply call a function ex NpcEntity.Respawn(); and dont forget to set its new X and Y;
question-teleporting to maze(using wallH) under 105 10/25/2009 - Dekaron - 1 Replies Hello there,
Does any body knows how to teleport into the doomed maze map? well usualy teleporting into maps can be done thourgh other maps like..from draco to python at0,0 or braikan to draco from 0,0 and so on.. any body knows from what map can i teleport to maze?
teleporting at any lvl 03/13/2008 - Dekaron - 2 Replies i want to know what cheat program to use where u can teleport to anywhre at any lvl. I seen a guy selling pots at crevice at very low lvl.. I heard tmme or uce but i dont know what they are..
teleporting 12/02/2007 - Planetside - 5 Replies im confused can any body tell me how to do the code cave stuff so things will not be detected? :confused:
No more teleporting? 06/01/2005 - World of Warcraft - 4 Replies Can any1 use a teleport hack now? bwh doesnt work(disconnected)... did Blizz fix it?
Any info would be welcome!
thx!