Kei 2 Posted October 30, 2013 how can make this one to teleport to my desired map?? pc->setpos(sd, sd->mapindex, x, y, CLR_TELEPORT); sprintf(atcmd_output, msg_txt(5), sd->bl.x, sd->bl.y); clif->message(fd, atcmd_output); Quote Share this post Link to post Share on other sites
0 Kei 2 Posted October 31, 2013 bump! need someone help me Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted October 31, 2013 I don't get what you're trying to do, could you please elaborate more? Also, are you sure a script wouldn't cover you better for warping a player when certain conditions are met instead of a source edit? Quote Share this post Link to post Share on other sites
0 Kei 2 Posted October 31, 2013 I don't get what you're trying to do, could you please elaborate more? Also, are you sure a script wouldn't cover you better for warping a player when certain conditions are met instead of a source edit? well i need it to teleport me to the map i desired example i set it to prontera .. then if i execute the command it will warp me directly to prontera. yes script will do.. but i need it for my custom commands Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted October 31, 2013 LOL you can use @go commands @go prontera type @go to show all available cities you can also use @warp <map name> <x> <y> Quote Share this post Link to post Share on other sites
0 Kei 2 Posted October 31, 2013 LOL you can use @go commands @go prontera type @go to show all available cities you can also use @warp <map name> <x> <y> thats only an example... Quote Share this post Link to post Share on other sites
0 Mhalicot 392 Posted October 31, 2013 take a look at this scripts, and see if this will fit your needs. *warp "<map name>",<x>,<y>; This command will take the invoking character to the specified map, and if wanted, specified coordinates too, but these can be random. warp "place",50,55; This would take them to X 50 Y 55 on the map called "place". If your X and Y coordinates land on an unwalkable map square, it will send the warped character to a random place. Same will happen if they are both zero: warp "place",0,0; Notice that while warping people to coordinates 0,0 will normally get them into a random place, it's not certain to always be so. Darned if I know where this is actually coded, it might be that this happens because square 0,0 is unwalkable on all official maps. Beware if you're using custom maps. There are also three special 'map names' you can use: "Random" will warp the player randomly on the current map. "Save" and "SavePoint" will warp the player back to their save point. --------------------------------------- *areawarp "<from map name>",<x1>,<y1>,<x2>,<y2>,"<to map name>",<x3>,<y3>{,<x4>,<y4>}; This command is similar to 'warp', however, it will not refer to the invoking character, but instead, all characters within a specified area, defined by the x1/y1-x2/y2 square, will be warped. Nobody outside the area will be affected, including the activating character, if they are outside the area. areawarp "place",10,10,120,120,"place2",150,150; Everyone that is in the area between X 10 Y 10 and X 120 Y 120, in a square shape, on the map called "place", will be affected, and warped to "place2" X 150 Y 150. areawarp "place",10,10,120,120,"place2",0,0; By using ,0,0; as the destination coordinates it will take all the characters in the affected area to a random set of co-ordinates on the "place2" map. areawarp "place",10,10,120,120,"place2",150,150,200,200; By using the optional x4 and y4 parameters, the destination coordinates will be a random place within the defined x3/y3-x4/y4 square. Like 'warp', areawarp will also explicitly warp characters randomly into the current map if you give the 'to map name' as "Random". See also 'warp'. --------------------------------------- *warpparty "<to_mapname>",<x>,<y>,<party_id>,{"<from_mapname>"}; Warps a party to specified map and coordinate given the party ID, which you can get with getcharid(1). You can also request another party id given a member's name with getcharid(1,<player_name>). You can use the following "map names" for special warping behavior: Random: All party members are randomly warped in their current map (as if they all used a fly wing). SavePointAll: All party members are warped to their respective save point. SavePoint: All party members are warped to the save point of the currently attached player (will fail if there's no player attached). Leader: All party members are warped to the leader's position. The leader must be online and in the current map-server for this to work. If you specify a from_mapname, warpparty will only affect those on that map. Example: mes "[Party Warper]"; mes "Here you go!"; close2; set @id,getcharid(1); warpparty "prontera",150,100,@id; close; --------------------------------------- *warpchar "<mapname>",<x>,<y>,<char_id>; Warps another player to specified map and coordinate given the char id, which you can get with getcharid(0,<player_name>). Obviously this is useless if you want to warp the same player that is executing this script, unless it's some kind of "chosen" script. Example: warpchar "prontera",150,100,150001; --------------------------------------- *warpguild "<mapname>",<x>,<y>,<guild_id>; Warps a guild to specified map and coordinate given the guild id, which you can get with getcharid(2). You can also request another guild id given the member's name with getcharid(2,<player_name>). You can use the following "map names" for special warping behavior: Random: All guild members are randomly warped in their current map (as if they all used a fly wing) SavePointAll: All guild members are warped to their respective save point. SavePoint: All guild members are warped to the save point of the currently attached player (will fail if there's no player attached). Example: warpguild "prontera",x,y,Guild_ID; --------------------------------------- *warppartner("<map name>",<x>,<y>); This function will find the invoking character's marriage partner, if any, and warp them to the map and coordinates given. Go kidnap that spouse. It will return 1 upon success and 0 if the partner is not online, the character is not married, or if there's no invoking character (no RID). 0,0 will, as usual, normally translate to random coordinates. Quote Share this post Link to post Share on other sites
0 jaBote 438 Posted October 31, 2013 You can use bindatcmd to create your new scripted commands to warp yourself wherever you want, or even put restrictions to current script commands before they get run. You could script your restrictive @warp if that's what you can, or put the restrictions to it. Quote Share this post Link to post Share on other sites
how can make this one to teleport to my desired map??
Share this post
Link to post
Share on other sites