Jump to content
  • 0

NPC Teleport Randomly


Radian

Question


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

Is it possible to make the npc. Teleport in the map of prontera for example? and random coordinates but it will trigger when someone finish using it?

 

anyone knows about this? if not its ok. thanks!

 

 

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

try change warp to these

while( !checkcell( strnpcinfo(4),( .@x = rand( 1,300 ) ),( .@y = rand( 1,300 ) ),cell_chkpass ) );
movenpc strnpcinfo(0),.@x,.@y;
Edited by Emistry
  • Upvote 2
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  166
  • Topics Per Day:  0.04
  • Content Count:  789
  • Reputation:   50
  • Joined:  04/16/12
  • Last Seen:  

finishing what? i didn't get what you mean 

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

finishing what? i didn't get what you mean 

 

Finish using the NPC. 

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

mes "Done talking to NPC";
close2;
warp "prontera",0,0;
end;

add this to your NPC.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

mes "Done talking to NPC";
close2;
warp "prontera",0,0;
end;

add this to your NPC.

 

 

I tested it. but the player was the one who got warped. not the NPC

Edited by Ginji
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

 

try change warp to these

while( !checkcell( strnpcinfo(4),( .@x = rand( 1,300 ) ),( .xy = rand( 1,300 ) ),cell_chkpass ) );
movenpc strnpcinfo(0),.@x,.@y;

 

Thanks, it solved the problem :)

 

Fixed (is it correct?)

.xy changed to .@y
Edited by Ginji
Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10013
  • Reputation:   2345
  • Joined:  10/28/11
  • Last Seen:  

movenpc only move the npc , change location

 

not hide the npc.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  162
  • Topics Per Day:  0.05
  • Content Count:  1546
  • Reputation:   192
  • Joined:  07/23/14
  • Last Seen:  

movenpc only move the npc , change location

 

not hide the npc.

 

Yes. i actually search on wiki about that. but the script you give me was not showing the npc.

 

i tried to change this part .xy into .@y. and it works thanks for your help :)

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  24
  • Topics Per Day:  0.01
  • Content Count:  78
  • Reputation:   1
  • Joined:  09/01/14
  • Last Seen:  

Thanks for this! Been searching for this everywhere.. Finally! You made my day :D

Edited by Talon
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...