Jump to content

Question

Posted

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.

7 answers to this question

Recommended Posts

Posted (edited)

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
Posted (edited)

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

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...