Hello. So i want to make players can't use commands like @storage, @load or @go on pvp and gvg mapflag but still can use @refresh. So I use this script
```
- script atcommand_main -1,{
OnAtStorage:
// Check GM level before proceeding
if (getgmlevel() < 90) {
dispbottom "You must be GM level 90 or above to use this command!";
end;
}
.@map$ = strcharinfo(3);
if (getmapflag(.@map$, mf_pvp) || getmapflag(.@map$, mf_gvg)) {
dispbottom .@atcmd_command$ + " failed in PVP/GVG maps";
}
else {
openstorage;
}
end;
OnAtLoad:
// Check GM level before proceeding
if (getgmlevel() < 90) {
dispbottom "You must be GM level 90 or above to use this command!";
end;
}
.@map$ = strcharinfo(3);
if (getmapflag(.@map$, mf_pvp) || getmapflag(.@map$, mf_gvg)) {
dispbottom .@atcmd_command$ + " failed in PVP/GVG maps";
}
else {
warp "SavePoint", 0, 0;
}
end;
OnAtGo:
// Check GM level before proceeding
if (getgmlevel() < 90) {
dispbottom "You must be GM level 90 or above to use this command!";
end;
}
.@map$ = strcharinfo(3);
if (getmapflag(.@map$, mf_pvp) || getmapflag(.@map$, mf_gvg)) {
dispbottom .@atcmd_command$ + " failed in PVP/GVG maps";
}
else {
// Implement go logic if needed
}
end;
Question
Imbecile
Hello. So i want to make players can't use commands like @storage, @load or @go on pvp and gvg mapflag but still can use @refresh. So I use this script
```
- script atcommand_main -1,{
OnAtStorage:
// Check GM level before proceeding
if (getgmlevel() < 90) {
dispbottom "You must be GM level 90 or above to use this command!";
end;
}
.@map$ = strcharinfo(3);
if (getmapflag(.@map$, mf_pvp) || getmapflag(.@map$, mf_gvg)) {
dispbottom .@atcmd_command$ + " failed in PVP/GVG maps";
}
else {
openstorage;
}
end;
OnAtLoad:
// Check GM level before proceeding
if (getgmlevel() < 90) {
dispbottom "You must be GM level 90 or above to use this command!";
end;
}
.@map$ = strcharinfo(3);
if (getmapflag(.@map$, mf_pvp) || getmapflag(.@map$, mf_gvg)) {
dispbottom .@atcmd_command$ + " failed in PVP/GVG maps";
}
else {
warp "SavePoint", 0, 0;
}
end;
OnAtGo:
// Check GM level before proceeding
if (getgmlevel() < 90) {
dispbottom "You must be GM level 90 or above to use this command!";
end;
}
.@map$ = strcharinfo(3);
if (getmapflag(.@map$, mf_pvp) || getmapflag(.@map$, mf_gvg)) {
dispbottom .@atcmd_command$ + " failed in PVP/GVG maps";
}
else {
// Implement go logic if needed
}
end;
OnInit:
// Binding @storage, @load, and @go commands
bindatcmd "storage", strnpcinfo(3) + "::OnAtStorage";
bindatcmd "load", strnpcinfo(3) + "::OnAtLoad";
bindatcmd "go", strnpcinfo(3) + "::OnAtGo";
end;
}```
but the problem is that the commands @storage, @load, and @go can't be used outside the PVP and gvg mapflag. can someone please help me?
Link to comment
Share on other sites
4 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.