Jump to content
  • 0

Guildmaster opens item (Box), all members get item?


HristDead

Question


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Too many selfish guild owners in my server... i want to try to avoid this this.

 

I'm looking for some sort of box item script. Say a guild master/castle owner opens/clicks this box item, then all the guildmembers get the item that the box contains.

 

Preferably must go through an IP check to avoid abuse too. Offline and online member get item! :)

 

Thank you so much rAthena.

Edited by HristDead
Link to comment
Share on other sites

6 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Aw, not possible? :(

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

like this ?

http://upaste.me/r/028018

 

db/re/item_db.txt

// ......{ callfunc "GuildReward"; },{},{}
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

@Emistry - That only gives them the items if they are online. The request is for offline as well, otherwise couldn't your script be reduced to this:

function    script    Guild_Reward    {
addrid(3);
getitem 501,1;
getitem 502,1;
getitem 503,3;
end;
}

Because my understanding is, addrid will only attach those who are online. So, to make this work with offline, we'd need to store it in the player's storage.

if( isloggedin ){ do this } else { query_sql("INSERT INTO `storage` (`account_id`,`name_id`,`amount`) VALUES ('"+.@aid[.@i]+"','501','1')"); }

Not sure if that's written right, but you get the idea. (Haven't been to good with sql lol hate it @.@)

Link to comment
Share on other sites


  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2350
  • Joined:  10/28/11
  • Last Seen:  

@GMOcean

i see .... addrid ...didnt noticed this..because rarely use this command. xP

 

for your method about adding item to inventory / storage .... it's actually a bad idea sometime. ( at least i think so )

because .. what will happen ? if their storage / inventory full ? =)

beside, storage might get bugged since someone alway store tons of equipment in storage. ( current bug that not yet solved in any emulator  when storage capacity above 600 )

but i think it would be good to insert the rewards into MAILBOX ...

 

there could be several way to do this too xD

since nobody trying to do it..so i just show a simple example, perhap this could help them to try starting to learn an try it too..

 

 

** i leave the IP check part let other member to try it. =) if anyone feel free to try it...go on ...

it would be kinda boring if everytime also same members/mods who do all these script supports .... hope to see some new face pop out somewhere in the forum ... hehe

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  31
  • Topics Per Day:  0.01
  • Content Count:  666
  • Reputation:   93
  • Joined:  04/27/12
  • Last Seen:  

Ahh, I didn't know about that bug.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  66
  • Topics Per Day:  0.02
  • Content Count:  167
  • Reputation:   2
  • Joined:  08/01/12
  • Last Seen:  

Thanks Emistry and GMOcean. I am not worried about too much item in storage, if I give box treasures i will only be 1 of 1 item. :)

 

Mailbox would be a nice idea.. is that hard to do?

 

Thanks for the help so far. :D

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

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

×
×
  • Create New...