Jump to content
  • 0

Question

Posted (edited)

can i request a script where if a guild leader exchange 1x TCG Card to the npc it'll give him and all the members who's currently online on the guild a 100x ygg berry?

Edited by caspa

1 answer to this question

Recommended Posts

Posted (edited)

Untested!

prontera,151,151,5	script	Exchange	51,{

mes "[Ygg Exchange]";

mes "I can give all your guild members 100 Ygg Berries in exchange for 1 TCG!"; next;

if(strcharinfo(0)!=getguildmaster(getcharid(2))) { mes "[Ygg Exchange]"; mes "I'm sorry but you're not the guild master."; close; }

if(select("Yes:No")&2) { mes "[Ygg Exchange]"; mes "Alright comeback anytime!"; close; }

if(!countitem(7227)) { mes "[Ygg Exchange]"; mes "I'm sorry but you don't seem to have any Ygg berries at all!"; close; }

delitem 7227,1;

query_sql( "SELECT `account_id` FROM `guild_member` WHERE `guild_id` = "+getcharid(2)+"", .@account_id );

for(set .@i,0; .@i<getarraysize(.@account_id);set .@i,.@i+1){

if(isloggedin(.@account_id[.@i]))

charcommand "#item "+rid2name(.account_id[.@i])+" 607 100";

}

end;

}

Edited by Skorm

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...