// ------------------- Functions -------------------
// * Go("<map>",<x>,<y>);
// ~ Warps directly to a map.
//
// * Disp("<Menu Option>",<first option>,<last option>);
// * Pick("<map_prefix>"{,<index offset>});
// ~ Dynamic menu and map selection (auto-numbered).
// ~ Fields and Dungeons must use Disp and Pick Functions.
//
// * Disp("<Option 1>:<Option 2>:<etc.>");
// * Pick("","<map1>","<map2>","<etc.>");
// ~ Manual menu and map selection (listed).
//
// * Restrict("<RE | Pre-RE>"{,<menu option numbers>});
// ~ Only allows map for Renewal or Pre-Renewal modes.
// If menu option numbers are given, only those maps
// will be restricted (i.e. not for "Go").
//
// Other notes:
// ~ Array @c[] holds all (x,y) coordinates.
// ~ Use @c[2] EXCEPT when maps begin dynamically
// at 0: use @c[0] and Pick() offset 1.
// --------------------------------------------------
function Go {
set lastwarp$, getarg(0);
set lastwarpx, getarg(1,0);
set lastwarpy, getarg(2,0);
warp getarg(0),getarg(1,0),getarg(2,0);
end;
}
function Disp {
if (getargcount() < 3)
set @menu$, getarg(0);
else {
set @menu$,"";
for (set .@i,getarg(1); .@i<=getarg(2); set .@i,.@i+1)
set @menu$, @menu$+getarg(0)+" "+.@i+":";
}
return;
}
function Pick {
set .@warp_block,@warp_block;
set @warp_block,0;
if((@f && .OnlyFirstFld) || (@d && .OnlyFirstDun)){
set .@select,1;
if(.@warp_block){
while(.@warp_block & (1<<.@select)){
.@select += 1;
}
}
}else{
set .@select, select(@menu$);
}
if (getarg(0) == "") {
set .@i, .@select;
set .@map$, getarg(.@i);
} else {
set .@i, .@select-getarg(1,0);
set .@map$, getarg(0)+((.@i<10)?"0":"")+.@i;
}
if (.@warp_block & (1<<.@select)) {
message strcharinfo(0),"This map is not enabled in "+((checkre(0))?"":"Pre-")+"Renewal.";
end;
}
set .@x, @c[.@i*2];
set .@y, @c[.@i*2+1];
deletearray @c[0],getarraysize(@c);
@f = false; @d = false;
Go(.@map$,.@x,.@y);
}
function Restrict {
if ((getarg(0) == "RE" && !checkre(0)) || (getarg(0) == "Pre-RE" && checkre(0))) {
if (getarg(1,0)) {
set @warp_block,0;
for (set .@i,1; .@i<getargcount(); set .@i,.@i+1)
set @warp_block, @warp_block | (1<<getarg(.@i));
} else {
message strcharinfo(0),"This map is not enabled in "+((checkre(0))?"":"Pre-")+"Renewal.";
end;
}
}
return;
}
OnInit:
.Satan_Morocc = true; // false will enable moc_fild 4,5,6,8,9,10,14,15 while disable moc_fild 20,21,22 Default is true.
.OnlyFirstFld = false; // true will teleport to the first level of the Fields Default is false.
.OnlyFirstDun = false; // true will teleport to the first level of the Dungeons Default is false.
}
Question
Sallycantdance
hello i would like to ask how to disable players to warp in the mvp maps thanks in advance
Link to comment
Share on other sites
7 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.