Chaos92 Posted January 16, 2014 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 4 hours ago Share Posted January 16, 2014 If theres any script that can gift rewards to any selected character names by the script for example if "Admin01","Admin02" talk to the npc, they can redeem the gift, but if other character talk to the npc, they didnt receive anything.Any scripts like that ? Quote Link to comment Share on other sites More sharing options...
Euphy Posted January 16, 2014 Group: Members Topic Count: 72 Topics Per Day: 0.02 Content Count: 2997 Reputation: 1132 Joined: 05/27/12 Last Seen: June 1, 2017 Share Posted January 16, 2014 Easy way is to just compare strings: set .@name$, strcharinfo(0); if (.@name$ == "Admin01" || .@name$ == "Admin02" || ... ) { //if (getgmlevel() < 1) end; //If this is GM only, block normal players too. getitem 501,1; end; }If you have a lot of names (100+, probably), you might want to use an SQL table or an array and search algorithm. Quote Link to comment Share on other sites More sharing options...
Chaos92 Posted January 16, 2014 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 1826 Reputation: 288 Joined: 08/03/12 Last Seen: 4 hours ago Author Share Posted January 16, 2014 allright im gonna try this Quote Link to comment Share on other sites More sharing options...
Question
Chaos92
If theres any script that can gift rewards to any selected character names by the script for example if "Admin01","Admin02" talk to the npc, they can redeem the gift, but if other character talk to the npc, they didnt receive anything.
Any scripts like that ?
Link to comment
Share on other sites
2 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.