celeron0134 Posted June 17, 2017 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Share Posted June 17, 2017 prontera,155,155,5 shop tooldealer 811 setarray .@items 501,502,503,504 setarray .@amount 10,20,30,40 .@maps prontera,izlude,morocc,aldebaran,alberta,payon,geffen Onbuyitem: Announce: "getcharname" has bought "getitemname" from the tool dealer on Prontera "get coordinates" @jumpnpc "tooldealer" rand(.@maps) random coordinates A Shop NPC that when a player buys an item after the transaction the NPC will jump on a random map with random coordinates Quote Link to comment Share on other sites More sharing options...
1 Deleted User Posted June 20, 2017 Group: Members Topic Count: 22 Topics Per Day: 0.00 Content Count: 235 Reputation: 55 Joined: 12/02/11 Last Seen: February 26, 2021 Share Posted June 20, 2017 On 6/17/2017 at 0:33 AM, celeron0134 said: prontera,155,155,5 shop tooldealer 811 setarray .@items 501,502,503,504 setarray .@amount 10,20,30,40 .@maps prontera,izlude,morocc,aldebaran,alberta,payon,geffen Onbuyitem: Announce: "getcharname" has bought "getitemname" from the tool dealer on Prontera "get coordinates" @jumpnpc "tooldealer" rand(.@maps) random coordinates A Shop NPC that when a player buys an item after the transaction the NPC will jump on a random map with random coordinates Hi, please try this. prontera.gat, 155, 185, 4 script Jumping Jack 757,{ setarray .@map_List$[0], "hugel", "yuno", "comodo", "xmas", "aldebaran", "izlude", "payon", "geffen", "morocc", "prontera"; mes "[ Jumping Jack ]"; mes "Hello"; close2; .@map$ = .@map_List$[ rand( getarraysize( .@map_List$ )) ]; do { .@x = rand(1,400); .@y = rand(1,400); } while( !checkcell(.@map$, .@x, .@y, cell_chkpass ) ); unitwarp getnpcid(0), .@map$, .@x, .@y; end; } 1 Quote Link to comment Share on other sites More sharing options...
0 Cyro Posted June 17, 2017 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 1138 Reputation: 290 Joined: 04/29/13 Last Seen: July 20, 2024 Share Posted June 17, 2017 (edited) I don't think it's possible to move NPC one map to other But you can teleport it in the same map, *movenpc "<NPC name>",<x>,<y>{,<dir>}; This command looks like the NPCWalkToxy function,but is a little different. While NPCWalkToXY just makes the NPC 'walk' to the coordinates given (which sometimes gives problems if the path isn't a straight line without objects), this command just moves the NPC. It basically warps out and in on the current and given spot. Direction can be used to change the NPC's facing direction. Example: // This will move Bugga from it's old coordinates to the new coordinates at 100,20 (if those coordinates are legit). moveNPC "Bugga",100,20; Something like Onbuyitem: while( !checkcell( strnpcinfo(4),( .@x = rand( 1,300 ) ),( .@y = rand( 1,300 ) ),cell_chkpass ) ); movenpc strnpcinfo(0),.@x,.@y; Edited June 17, 2017 by Cyro Quote Link to comment Share on other sites More sharing options...
0 celeron0134 Posted June 17, 2017 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Author Share Posted June 17, 2017 i remember a event which is similar to my request.. if my memory serves me right.. i think its called hide and seek event that is automated.. the name of the NPC is jumper.. when a player finds the NPC.. the NPC will reward the player then jumps on other locations.. or maybe someting like enebling and disabling the npc.. prontera,155,155,5 shop bugga #1 757 alberta,155,155,5 shop bugga#2 757 izlude,155,155,5 shop bugga#3 757 onbuyitem announce player then npc will be disabled and then enable albera's bugga and then player buys on alberta's bugga.. the npc will disable and enable izlude's bugga and then disable,izlude's bugga and enable prontera's bugga pls help me thanks Quote Link to comment Share on other sites More sharing options...
0 celeron0134 Posted June 17, 2017 Group: Members Topic Count: 66 Topics Per Day: 0.02 Content Count: 194 Reputation: 1 Joined: 12/13/16 Last Seen: February 14, 2023 Author Share Posted June 17, 2017 like this one? setnpcdisplay "Jumper"+$@ran+"",1002; movenpc "Jumper"+$@ran+"",1,1; //move the NPC set $@ran, rand(1,10); if ($@ran == 10) set $@jmpmap$,"hugel"; if ($@ran == 9) set $@jmpmap$,"yuno"; if ($@ran == 8) set $@jmpmap$,"comodo"; if ($@ran == 7) set $@jmpmap$,"xmas"; if ($@ran == 6) set $@jmpmap$,"aldebaran"; if ($@ran == 5) set $@jmpmap$,"izlude"; if ($@ran == 4) set $@jmpmap$,"payon"; if ($@ran == 3) set $@jmpmap$,"geffen"; if ($@ran == 2) set $@jmpmap$,"morocc"; if ($@ran == 1) set $@jmpmap$,"prontera"; announce "Jumper Event : Go Find me!! I'm here in "+$@jmpmap$+"!!!",bc_blue; Quote Link to comment Share on other sites More sharing options...
0 Emistry Posted June 24, 2017 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Sunday at 05:32 PM Share Posted June 24, 2017 You can try something like this. https://pastebin.com/Y0wRMZj8 There are few way to do it: create multiple npc and then hide + unhide npc at different town use the unitwarp script command to warp the npc etc Quote Link to comment Share on other sites More sharing options...
Question
celeron0134
prontera,155,155,5 shop tooldealer 811
setarray .@items 501,502,503,504
setarray .@amount 10,20,30,40
.@maps prontera,izlude,morocc,aldebaran,alberta,payon,geffen
Onbuyitem: Announce: "getcharname" has bought "getitemname" from the tool dealer on Prontera "get coordinates"
@jumpnpc "tooldealer" rand(.@maps) random coordinates
A Shop NPC that when a player buys an item after the transaction the NPC will jump on a random map with random coordinates
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.