Jump to content
  • 0

Need a little help


PandaLovesHamster

Question


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

I have a script that changes the list of items they sell every 4 hours, what I want it to do is make it teleport to random cities and announce where they are.

I could probably do it with an array with maps in it, but I'm wondering on how the X and Y coordinates would be static everytime they jump to a certain city.

Example:

NPC jumped to Prontera at 150, 150. That 150,150 is constant for the prontera map (hard-coded)
NPC jumped to Payon at X,Y. Same as above, it would be constant.
NPC jumped to Prontera again, now he will spawn at 150,150 again.

 

A small snippet would be okay for me, thank you.

Link to comment
Share on other sites

7 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  48
  • Topics Per Day:  0.01
  • Content Count:  1443
  • Reputation:   337
  • Joined:  10/17/12
  • Last Seen:  

However, how do I make it like that for the NPC?

 

its simply the same emelemnt of array for each array, it works better if you tabulate like this

	setarray .M$[0],		"abyss_01"	,"abyss_02"	,"abyss_03"	,"prt_maze02"	,"ein_fild08"	,"lou_fild01";
	setarray .XX[0],		206		,176		,40		,11		,0		,0;
	setarray .YY[0],		91		,207		,162		,169		,0		,0;

then you can see it by just scrolling down

 

 

then you can

	set .@i,select(implode(.M$,":") - 1);
	warp .M$[.@i],.XX[.@i],.YY[.@i];
Edited by Stolao
  • Upvote 1
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   261
  • Joined:  04/25/12
  • Last Seen:  

setarray .@mapname$[0],"prontera","payon";

setarray .@x[0],150,150;

setarray .@y[0],150,150;

Something like this?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

Well yes, however I want the X and Y arrays to be assigned to their own maps accordingly. Which makes me stuck on what to do xD

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  53
  • Topics Per Day:  0.01
  • Content Count:  411
  • Reputation:   261
  • Joined:  04/25/12
  • Last Seen:  

Well yes, however I want the X and Y arrays to be assigned to their own maps accordingly. Which makes me stuck on what to do xD

 

setarray .@mapname$[0],"prontera","payon";

setarray .@x[0],150,100;

setarray .@y[0],150,30;

 

A warp sample to payon would be:

 

warp .@mapname$[1],.@x[1],.@y[1];

// "payon",100,30;

Edited by Zell
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  51
  • Topics Per Day:  0.01
  • Content Count:  452
  • Reputation:   33
  • Joined:  12/18/14
  • Last Seen:  

However, how do I make it like that for the NPC?

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...