Possible? (fly wing)

classy5

New member
Messages
119
Points
0
Github
classy5
Flywing that effects is to teleport you to any cell on your screen not map.

 
getmapxy

add ~30 to x and y

warp
can you please write it in script? im kinda noob xD.. thanks

Script: <asfaskfkjl>
You could start here in case of lacking knowledge: https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt

Trial & error is a great master, though takes time.

You could declare a function, to store the getmapxy value(s), for example using ".@location" or the example used in the document that should be readily available ".@mapname$", ".@mapx" & ".@mapy".

Then you'll need to randomize between the range you're looking for, rand(30) and store that in a variable ".@value_x" & rand(30)  in a second variable ".@value_y".

Call the random values in your warp statement and use the mapname from getmapxy, add the random values to your mapx & mapy values to teleport them in that range (the on-screen range).

Mess around a little, show us what you got and then we can help you out further. I said this not to be mean, but to help you develop insight in scripting, good luck!

 
I just guestimate 30, maybe -+ 12, you can still warp to unwalkable places,

 
I just guestimate 30, maybe -+ 12, you can still warp to unwalkable places,
If you find such spots, modify the walkable areas in BROWEDIT, use WeeMapCache and you've solved that issue too.

Was just tagging along with the example, I think 17 is the visible range, or you can set it somewhere in config too I thought.

Anyhow, think along that path and it'll work.

 
- script ksdfkjsdhfksj FAKE_NPC,{// set .@range, getbattleflag("area_size");// getmapxy .@map$, .@x, .@y, 0;// while ( checkcell( strcharinfo(3), .@x = rand( .@x - .@range, .@x + .@range ), .@y = rand( .@y - .@range, .@y + .@range ), cell_chknopass ) );// warp .@map$, .@x, .@y;// end;OnInit: setitemscript Wing_Of_Fly, "{ set .@range, getbattleflag("area_size"); getmapxy .@map$, .@x, .@y, 0; while ( checkcell( strcharinfo(3), .@x = rand( .@x - .@range, .@x + .@range ), .@y = rand( .@y - .@range, .@y + .@range ), cell_chknopass ) ); warp .@map$, .@x, .@y; }", 0;}@@Tranquilityvisible range is set in

// Visible area size (how many squares away from a player can they see)

area_size: 14
btw can anyone link me to the npc sprite ID with names ?gonne pin at script support

because when I put 100 as sprite ID server pump msg says it is depricated soon

EDIT: change -1 into FAKE_NPC

 
Last edited by a moderator:
- script ksdfkjsdhfksj FAKE_NPC,{// set .@range, getbattleflag("area_size");// getmapxy .@map$, .@x, .@y, 0;// while ( checkcell( strcharinfo(3), .@x = rand( .@x - .@range, .@x + .@range ), .@y = rand( .@y - .@range, .@y + .@range ), cell_chknopass ) );// warp .@map$, .@x, .@y;// end;OnInit: setitemscript Wing_Of_Fly, "{ set .@range, getbattleflag("area_size"); getmapxy .@map$, .@x, .@y, 0; while ( checkcell( strcharinfo(3), .@x = rand( .@x - .@range, .@x + .@range ), .@y = rand( .@y - .@range, .@y + .@range ), cell_chknopass ) ); warp .@map$, .@x, .@y; }", 0;}@@Tranquilityvisible range is set in

// Visible area size (how many squares away from a player can they see)

area_size: 14
btw can anyone link me to the npc sprite ID with names ?gonne pin at script support

because when I put 100 as sprite ID server pump msg says it is depricated soon

EDIT: change -1 into FAKE_NPC
Such amazing, but I wanted him/her to get into scripting ;p

 
or edit

pc.c for all tele haha
 

Code:
@@ -5155,8 +5155,10 @@ int pc_randomwarp(struct map_session_data *sd, clr_type type) { 		return 0;  	do {-		x=rnd()%(map->list[m].xs-2)+1;-		y=rnd()%(map->list[m].ys-2)+1;+		x=rnd()%30;+		y=rnd()%30;+		x=x>14 ? sd->bl.x+x-15 : sd->bl.x-x;+		y=y>14 ? sd->bl.y+y-15 : sd->bl.y-y; 	} while( map->getcell(m,x,y,CELL_CHKNOPASS) && (i++) < 1000 );  	if (i < 1000)
 
Last edited by a moderator:
Back
Top