Welcome!

Join our community of MMO enthusiasts and game developers! By registering, you'll gain access to discussions on the latest developments in MMO server files and collaborate with like-minded individuals. Join us today and unlock the potential of MMO server development!

Join Today!

[Release] My warp commands (warp, warpto, mwarpto)

Status
Not open for further replies.
Newbie Spellweaver
Joined
Oct 19, 2007
Messages
20
Reaction score
0
Here is my warp commands, !warp, !warpto, !mwarpto

-----

!warp = Warps players to the selected mapid :p

Code:
!warp <Name> <MapID>
for example:

Code:
!warp coNsept 100000000

It will warp coNsept to henesys:p

-----

!warpto = Warps yourself to the selected player

Code:
!warpto <Name>

for example:
Code:
!warpto coNsept

It will warp me to coNsept... I need to check how to change the pos..

-----

!mwarpto = Warps the selected player to you

Code:
!mwarpto <Name>

for example:
Code:
!mwarpto coNsept

It will warp coNsept to me.

-----

To add it you will need to add the codes to the chathandle function... before the
Code:
return;

here is the codes:

Code:
// Made by coNsept
        else if(strcmp(command, "warp") == 0){
            char *name = strtok_s(NULL, " ",&next_token);
            if (strlen(name) > 0)
                for (hash_map <int, Player*>::iterator iter = Players::players.begin(); iter != Players::players.end(); iter++)
                    if (strcmp(iter->second->getName(), name) == 0)
                        if(strlen(next_token) > 0)
                        {
                            int mapid = strval(strtok_s(NULL, " ",&next_token));
                            if(Maps::info.find(mapid) != Maps::info.end())
                                Maps::changeMap(iter->second ,mapid, 0);
                        }
        }
        else if(strcmp(command, "warpto") == 0){
            char *name = strtok_s(NULL, " ",&next_token);
            if (strlen(name) > 0)
                for (hash_map <int, Player*>::iterator iter = Players::players.begin(); iter != Players::players.end(); iter++)
                    if (strcmp(iter->second->getName(), name) == 0)
                        Maps::changeMap(player , iter->second->getMap(), iter->second->getMappos());
        }
        else if(strcmp(command, "mwarpto") == 0){
            char *name = strtok_s(NULL, " ",&next_token);
            if (strlen(name) > 0)
                for (hash_map <int, Player*>::iterator iter = Players::players.begin(); iter != Players::players.end(); iter++)
                    if (strcmp(iter->second->getName(), name) == 0)
                        Maps::changeMap(iter->second , player->getMap(), player->getMappos());
        }

Made by me, coNsept :)
 
Junior Spellweaver
Joined
Apr 25, 2007
Messages
100
Reaction score
0
looks nice il try soon!
after i am done rebuilding
 
Junior Spellweaver
Joined
Aug 24, 2006
Messages
105
Reaction score
0
Nice man thanks, Just compiled it with no errors, seems like its working, thanks bro.
 

DtN

Newbie Spellweaver
Joined
Apr 5, 2008
Messages
80
Reaction score
1
Cool, I'll test this out later. This is just what I needed. ^^
 
Banned
Banned
Joined
Oct 19, 2006
Messages
400
Reaction score
1
Thanks a bunch. Now being used in my WeedStory Repack that I will release in a few days.
 
Newbie Spellweaver
Joined
Apr 29, 2007
Messages
20
Reaction score
0
Nice work dude ..
something to the names ^^

i think it would be better if you rename !warp to !charwarp ^^

because !warp is more like !map =P

an !mwarpto to !warptome ^_^

but nice work
 
Experienced Elementalist
Joined
Jan 10, 2008
Messages
224
Reaction score
27
Nice, but I will add something that will do it easier(so you don't need to check all the connected players)
 
Newbie Spellweaver
Joined
Apr 6, 2008
Messages
7
Reaction score
0
Nice work dude ..
something to the names ^^

i think it would be better if you rename !warp to !charwarp ^^

because !warp is more like !map =P

an !mwarpto to !warptome ^_^

but nice work

If you want them like that just change them its not that hard.

else if(strcmp(command, "CHANGE NAME HERE!") == 0){
 
Junior Spellweaver
Joined
Jan 26, 2006
Messages
112
Reaction score
0
both link dont work for me if you can upload it to another sites I will be thankful to you.
 
Junior Spellweaver
Joined
Apr 4, 2007
Messages
164
Reaction score
2
Where to insert the code?S: Sorry for being noob here.
 
Newbie Spellweaver
Joined
Apr 4, 2008
Messages
8
Reaction score
0
Yeah... I don't really know which file to put it into either. Specifying the exact location would be much appreciated. ^_^
 
Status
Not open for further replies.
Back
Top