OnNplay Posted November 22, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 141 Reputation: 15 Joined: 01/08/12 Last Seen: July 26, 2014 Share Posted November 22, 2012 The script will be placed in the item. Closer to this purpose is Megaphone. I want selected item will make @item for the selected account id. When the character of the account id click on it will get input box. The input box will collect the item name or item code and quantity. So the character will get the item. Quote Link to comment Share on other sites More sharing options...
Ryokem Posted November 22, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 205 Reputation: 19 Joined: 10/12/12 Last Seen: November 7, 2013 Share Posted November 22, 2012 Just call a function inside the item. Make it an usable item. { callfunc "getItem__"; },{},{} then the function itself.. function script getItem__ { mes "input the ID"; input .@id; //Code to check if the input is avaible/correct mes "input the amount"; input .@amount; //Code to check if the input is avaible/correct getitem .@id, .@amount; return; } Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 22, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted November 22, 2012 Ryokem i know this is offtopic but how about putting a custom item if double click a @command > @autoattack will be used but the with expiration time Quote Link to comment Share on other sites More sharing options...
Ryokem Posted November 22, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 205 Reputation: 19 Joined: 10/12/12 Last Seen: November 7, 2013 Share Posted November 22, 2012 (edited) Yeah, you can add a timer and setting that kinf of command too, exactly in the same way. Something like... function script command__ { attachnpctimer getcharid(3); atcommand "@autoattack"; initnpctimer; return; OnTimer60000: //60 seconds OnTimerQuit: atcommand "@autoattack"; end; } Note that you have to be careful to use an @command in the OnTimerQuit label, 'cause the player already logged out but it may be still able to run the command. Edited November 22, 2012 by Ryokem Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 22, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted November 22, 2012 so the problem in the command script is that it can be exploited?? it will delete the item right if its usable?.. thanks Quote Link to comment Share on other sites More sharing options...
Ryokem Posted November 22, 2012 Group: Members Topic Count: 0 Topics Per Day: 0 Content Count: 205 Reputation: 19 Joined: 10/12/12 Last Seen: November 7, 2013 Share Posted November 22, 2012 Yeah, it will delete the item if you set that the item expires after being used. And I personally try not to use atcommand command inside scripts unless it's really the only choice I have, mostly 'cause of server runtime. Quote Link to comment Share on other sites More sharing options...
GM Takumirai Posted November 22, 2012 Group: Members Topic Count: 69 Topics Per Day: 0.01 Content Count: 592 Reputation: 31 Joined: 11/14/11 Last Seen: July 29, 2015 Share Posted November 22, 2012 i see, is there an alternative way? Quote Link to comment Share on other sites More sharing options...
OnNplay Posted November 22, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 141 Reputation: 15 Joined: 01/08/12 Last Seen: July 26, 2014 Author Share Posted November 22, 2012 Thank you. This is really help. How about with checking account no. Example, I want it only serve account no. 2000004 other than this account no. the script will be not activated. Quote Link to comment Share on other sites More sharing options...
Emistry Posted November 22, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10018 Reputation: 2369 Joined: 10/28/11 Last Seen: Yesterday at 04:49 PM Share Posted November 22, 2012 Thank you. This is really help. How about with checking account no. example 2000004 if( getcharid(3) == 2000004 ){ // do what you want here... } reference getcharid Quote Link to comment Share on other sites More sharing options...
OnNplay Posted November 22, 2012 Group: Members Topic Count: 9 Topics Per Day: 0.00 Content Count: 141 Reputation: 15 Joined: 01/08/12 Last Seen: July 26, 2014 Author Share Posted November 22, 2012 function script getItem__ {if( getcharid(3) == 2000004 ){ mes "input the ID"; input .@id; mes "input the amount"; input .@amount; getitem .@id, .@amount; return; }} //Code to check if the input is avaible/correct //Code to check if the input is avaible/correct Any one please help this fine tuning. Quote Link to comment Share on other sites More sharing options...
Question
OnNplay
The script will be placed in the item. Closer to this purpose is Megaphone.
I want selected item will make @item for the selected account id.
When the character of the account id click on it will get input box.
The input box will collect the item name or item code and quantity.
So the character will get the item.
Link to comment
Share on other sites
9 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.