I'm trying to create an item for a guild leader in which the effect will be:
+20 MATK per online guild member
Here's my current script:
set .@gid, getcharid(2);
if ( strcharinfo(0) == getguildmaster(getcharid(2)) ) {
getguildmember .@gid;
bonus bMatk,$@guildmembercount*20;
}
if ( getcharid(2) == 0 ) {
end;
}
end;
It does work though the value still adds even if the guild members are offline. Is there away to add an online check on this script?
Edit: NVM. Made it work. Just added a login check in the item script and a seperate Log In/Log Out Event NPC to equip/unequip the item to refresh it's effect when a guild member logs in or out.
Question
ran0120
I'm trying to create an item for a guild leader in which the effect will be:
+20 MATK per online guild member
Here's my current script:
set .@gid, getcharid(2); if ( strcharinfo(0) == getguildmaster(getcharid(2)) ) { getguildmember .@gid; bonus bMatk,$@guildmembercount*20; } if ( getcharid(2) == 0 ) { end; } end;
It does work though the value still adds even if the guild members are offline. Is there away to add an online check on this script?
Edit: NVM. Made it work. Just added a login check in the item script and a seperate Log In/Log Out Event NPC to equip/unequip the item to refresh it's effect when a guild member logs in or out.
Edited by ran0120FIXED.
Link to comment
Share on other sites
0 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.