Jump to content

Recommended Posts

  • 2 weeks later...
Posted (edited)

Hmm, I'm not saying it "shouldn't" be added, but we already currently have something like it.

*bindatcmd "command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};
*bindatcmd("command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>});
This command will bind a NPC event label to an atcommand. Upon execution of
the atcommand, the user will invoke the NPC event label.

With this you can litterally do the exact same thing, and make it so player's can't use the command on certain maps.

Additionally we have with i.

*unbindatcmd "command";
*unbindatcmd("command");
This command will unbind a NPC event label from an atcommand.

So, you can pretty much make atcommands only accessible after meeting requirements and so on.

Edited by GmOcean
Posted

Hmm, I'm not saying it "shouldn't" be added, but we already currently have something like it.

*bindatcmd "command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>};
*bindatcmd("command","<NPC object name>::<event label>"{,<atcommand level>,<charcommand level>});
This command will bind a NPC event label to an atcommand. Upon execution of
the atcommand, the user will invoke the NPC event label.

With this you can litterally do the exact same thing, and make it so player's can't use the command on certain maps.

Additionally we have with i.

*unbindatcmd "command";
*unbindatcmd("command");
This command will unbind a NPC event label from an atcommand.

So, you can pretty much make atcommands only accessible after meeting requirements and so on.

but that is a really weird way of doing this xDD

Posted (edited)

I wouldn't think so.

-	script	test_npc	-1,{
OnInit:
bindatcmd("@storage","test_npc::OnStorage");
end;
OnStorage:
set .@maps$[0],"prontera","payon","alberta","etc...";
getmapxy(.@m$,.@x,.@y,0);
for(set .@i,0; .@i<getarraysize(.@maps$); set .@i,.@i+1)
{if(.@m$==.@maps$[.@i]){dispbottom "@storage is disabled on this map."; end;}}
openstorage;
end;
}

Personally, I just think that using the bindatcmd script command is better since it is more versatile. Your basically free to put any pre-requisists for using a command/limitations for using one while using the script. Example: Limit @warp to only work during 18:00 -> 00:00. Or making @storage only useable 5->10x a day, then after that charge them zeny or an item to use it further past that amount/time. There really is limitless possibilities, just depends on your imagination.

Edited by GmOcean
Posted (edited)

I wouldn't think so.

-	script	test_npc	-1,{
OnInit:
bindatcmd("@storage","test_npc::OnStorage");
end;
OnStorage:
set .@maps$[0],"prontera","payon","alberta","etc...";
getmapxy(.@m$,.@x,.@y,0);
for(set .@i,0; .@i<getarraysize(.@maps$); set .@i,.@i+1)
{if(.@m$==.@maps$[.@i]){dispbottom "@storage is disabled on this map."; end;}}
openstorage;
end;
}

Personally, I just think that using the bindatcmd script command is better since it is more versatile. Your basically free to put any pre-requisists for using a command/limitations for using one while using the script. Example: Limit @warp to only work during 18:00 -> 00:00. Or making @storage only useable 5->10x a day, then after that charge them zeny or an item to use it further past that amount/time. There really is limitless possibilities, just depends on your imagination.

I know how could I use the way you told me to, but you don't really got what I'm trying to achieve here :P and I want it as simple as restrictatcmd(prontera,uptime,60); :P and btw now we have strcharinfo(3) so there is no need to use getmapxy just to get mapname xD

Edited by EvilPuncker
  • 1 month later...
  • 3 weeks later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

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