Jump to content

Question

Posted

Hello, there!

  I have an idea of a town/dungeon warps rotation on a Warper NPC that chooses a few destinations from a random list that change everyday. I've been trying to do this will simple script but I'm not able to.

Does anyone has the desire and time to do it for me? I appreciate it.

1 answer to this question

Recommended Posts

  • 0
Posted
prontera,155,181,5	script	Sample	45,2,2,{
	end;
	
	function	func_AddWarp	{
		.@map$ = getarg(0, "");
		.@x = getarg(1, 0);
		.@y = getarg(2, 0);
		
		if (getmapusers(.@map$) >= 0) {
			.map$[.map_size] = .@map$;
			.x[.map_size] = .@x;
			.y[.map_size] = .@y;
			.map_size++;
		}
		return;
	}
	
	OnTouch:
		warp .map$[.index], .x[.index], .y[.index];
		end;
		
	OnInit:
		// func_AddWarp("map", x, y);
		func_AddWarp("prontera", 155, 181);
		func_AddWarp("payon", 0, 0);
		func_AddWarp("izlude", 100, 100);
		func_AddWarp("prt_fild01", 120, 60);
	OnHour00:
		.index = rand(.map_size);
		end;
}

 

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