|
You last visited: Today at 08:36
Advertisement
Direct a foreach at Char in Map?
Discussion on Direct a foreach at Char in Map? within the CO2 Private Server forum part of the Conquer Online 2 category.
03/28/2010, 19:10
|
#1
|
elite*gold: 0
Join Date: May 2008
Posts: 99
Received Thanks: 35
|
Direct a foreach at Char in Map?
I've been working at a hunt quest that teleports chars to a map where they must kill a monster get a key find the treasure box, open it then teleport back to TC.
This is what I have but it directs the tele to all characters in game
foreach (Game.Character C in Game.World.H_Chars.Values)
{
Game.World.SendMsgToAll("SYSTEM", "The Treasure has been found. Better luck next time.", 2011, 0);
C.Teleport(1002, 429, 379);
}
how would I direct this to only the characters in the map? I've tried millions of different things...even tried using bools that change the subject of the NPC but for some reason it wont' switch false to true...even with a command...grrrzzz...any and all help is greatly appreciated. (Sometimes I wish I stuck with my 5095 server lol)
|
|
|
03/30/2010, 23:46
|
#2
|
elite*gold: 20
Join Date: Mar 2006
Posts: 6,126
Received Thanks: 2,518
|
Moved.
|
|
|
03/30/2010, 23:50
|
#3
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by ktamer
I've been working at a hunt quest that teleports chars to a map where they must kill a monster get a key find the treasure box, open it then teleport back to TC.
This is what I have but it directs the tele to all characters in game
foreach (Game.Character C in Game.World.H_Chars.Values)
{
Game.World.SendMsgToAll("SYSTEM", "The Treasure has been found. Better luck next time.", 2011, 0);
C.Teleport(1002, 429, 379);
}
how would I direct this to only the characters in the map? I've tried millions of different things...even tried using bools that change the subject of the NPC but for some reason it wont' switch false to true...even with a command...grrrzzz...any and all help is greatly appreciated. (Sometimes I wish I stuck with my 5095 server lol)
|
make it look for (if char is in map = ????)
|
|
|
03/31/2010, 01:07
|
#4
|
elite*gold: 0
Join Date: Apr 2008
Posts: 1,152
Received Thanks: 321
|
Code:
foreach (DictionaryEntry DE in World.H_Chars)
{
Character Entity = (Character)DE.Value;
if (Entity.Loc.Map == 1505)
{
Entity.Teleport(1002, 420, 420);
}
}
|
|
|
03/31/2010, 04:15
|
#5
|
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
|
=P lol, yah- you could use an if statement with "if character is on this map" but...
Why not have it so that it checks how far you are into it ... then it can knock off a few players and revel a 2nd prize.. then knock off a few players so that only 2 remain and have a third treasure (or prize or whatever you want)?
That'd be more exciting. Have it so that a progress is saved to the character's structure and then have it reset on log in to 0. That could track it. =]
Good luck ^^
PS: I'm with you bro! C# for fun! Woot!!
=P
|
|
|
03/31/2010, 04:32
|
#6
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by -NewDawn-
=P lol, yah- you could use an if statement with "if character is on this map" but...
Why not have it so that it checks how far you are into it ... then it can knock off a few players and revel a 2nd prize.. then knock off a few players so that only 2 remain and have a third treasure (or prize or whatever you want)?
That'd be more exciting. Have it so that a progress is saved to the character's structure and then have it reset on log in to 0. That could track it. =]
Good luck ^^
PS: I'm with you bro! C# for fun! Woot!!
=P
|
maybe cuz he didnt want a 2nd prize ^^
|
|
|
03/31/2010, 05:54
|
#7
|
elite*gold: 0
Join Date: Feb 2010
Posts: 378
Received Thanks: 86
|
Quote:
Originally Posted by grillmad
maybe cuz he didnt want a 2nd prize ^^
|
Lol, just a suggestion to make it more interesting =P
Have a message pop up that says "Player Name has been eliminated" that only appears on the game map xP
that's what I'd do. rofl =P
|
|
|
03/31/2010, 06:09
|
#8
|
elite*gold: 0
Join Date: Feb 2009
Posts: 1,765
Received Thanks: 382
|
Quote:
Originally Posted by -NewDawn-
Lol, just a suggestion to make it more interesting =P
Have a message pop up that says "Player Name has been eliminated" that only appears on the game map xP
that's what I'd do. rofl =P
|
Yea could be cool ^^ Thought is not that hard to make :P
|
|
|
04/01/2010, 05:45
|
#9
|
elite*gold: 0
Join Date: May 2008
Posts: 99
Received Thanks: 35
|
I appreciate the help. Sorry for the late thx, been crankin away at things.
At -NewDawn-
I like your idea. I think alternate prizes would be a good idea. And definitely easy enough to do. As for the rest of the chars, I could tele them to an alternate/copy version of horserace map. Losers take the walk sort of thing ^_^. Once it's all done I'll release it for sure.
Thx again.
|
|
|
 |
Similar Threads
|
WOuld someone help direct me....
07/27/2010 - GW Bots - 7 Replies
Hi, due to my lack in ability to speak dutch/german and the fact that i cant find a translator thats worth anything.....I have been scouring this site for a GW bot that farms snow wurms in Boreal Station. If anyone can direct me to that i would be in your debt. Thank you and have a wonderful day.
|
C++ und Direct X
07/01/2010 - C/C++ - 4 Replies
Guten tag Leute, ich hab vor mir ein Buch zu der
Spieleprogrammierung mit Direct X und C++ zu kaufen. Hatte erst
vor mir Premium zugang für folgende Seite zu holen:
DirectX Tutorial.com - DirectX 9 Tutorials
Jedoch liest man da nicht unbedingt gutes drüber deswegen
wollte ich mir mal ein paar Tipps von Leuten holen die sich eventuell
das ein oder andere Buch gekauft haben. Wäre von Vorteil
wenn das Buch in Deutsch wäre ist aber nicht unbedingt notwendig.
Ein weiteres problem ist, das...
|
can any direct me
06/19/2009 - Zero - 0 Replies
can any please tell me how i would go about makeing a spped hack or if there is a topic explainging already i cant see please send me the address
|
looking for direct x 9
03/09/2008 - GunZ - 1 Replies
im looking for direct x 9 for gunz if you know the website please tell me thanks:cool:
|
All times are GMT +1. The time now is 08:37.
|
|