Yasunari Ishibashi Posted January 9, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Share Posted January 9, 2012 (edited) So the script function is to give the gift of each end of WoE to the owner of a certain castle & gifts directly given to all players in a guild that won the WoE, so I want to give gifts Item ID: 7539 & Cashpoint +10 every time WoE ends. only an online player who get the prize. if anyone can make a simple script? thanks. Edited January 9, 2012 by Yasunari Ishibashi Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 9, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Friday at 11:44 PM Share Posted January 9, 2012 (edited) Hi! Here's a script from Goddameit which i have edited... //Author : Goddameit //Version : 2011/12/16 - 01:04 function script AllGuildMemberEvent { if(!set(.@gid,getcastledata(getarg(0),1))) return; query_sql("select account_id, char_id from `guild_member` where guild_id = '"+.@gid+"'", .@gmaid, .@gmcid); for(set .@i,0;.@i { if(isloggedin(.@gmaid[.@i])) getitem 12628,1,.@gmaid[.@i]; } } - script AGME -1,{ OnAGME: setarray .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05"; setarray .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05"; setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05"; setarray .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; for( set .@i,0; .@i <= 19; set .@i, .@i+1) { callfunc "AllGuildMemberEvent",.@maps$[.@i],0, "System","WoE Victory Reward","Congratulations! Your guild succeeded in occupying "+ getcastlename(.@maps$[.@i]) +". This is your rewards.", 501,1,1,0, "[You got a mail!! Please relogin to reupdate your mail list.]"; } end; } For the cashpoints, just make an item that gives a cash point and add it's getitem command.. EDIT: I forgot to tell you to add onAgitEnd of your woe script.. donpcevent "AGME::OnAGME"; Hope it helps.. Edited January 9, 2012 by wakoko321 Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted January 10, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Author Share Posted January 10, 2012 (edited) What if I use the Toasty WoE? where I should put donpcevent "AGME:: OnAGME";? if (isloggedin (. @ gmaid [. @ i])) getitem 12628.1,. @ gmaid [. @ i]; CASHPOINTS set #, # CASHPOINTS + 10 is it like that? Edited January 10, 2012 by Yasunari Ishibashi Quote Link to comment Share on other sites More sharing options...
Emistry Posted January 10, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: Tuesday at 05:38 PM Share Posted January 10, 2012 ??? if (isloggedin (. @ gmaid [. @ i])) getitem 12628.1,. @ gmaid [. @ i]; CASHPOINTS set #, # CASHPOINTS + 10 that is wrong.... should be like this if( isloggedin (.@gmaid[.@i])){ getitem 12628.1,.@gmaid[.@i]; set #CASHPOINTS,#CASHPOINTS + 10; } Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted January 11, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Author Share Posted January 11, 2012 What if I use the Toasty WoE? where I should put donpcevent "AGME:: OnAGME";? Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 13, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Friday at 11:44 PM Share Posted January 13, 2012 sorry for the late reply.. I'm using Toasty's Woe Controller too.. find the line announce "The War Of Emperium is over!",bc_all; donpcevent strnpcinfo(3)+"::OnDisplayOwners"; add it after that... Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted January 14, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Author Share Posted January 14, 2012 okay I'll try, thanks Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted January 14, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Author Share Posted January 14, 2012 //Author : Goddameit //Version : 2011/12/16 - 01:04 function script AllGuildMemberEvent { if(!set(.@gid,getcastledata(getarg(0),1))) return; query_sql("select account_id, char_id from `guild_member` where guild_id = '"+.@gid+"'", .@gmaid, .@gmcid); for(set .@i,0;.@i -> something is missing? please justification script. { Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 14, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Friday at 11:44 PM Share Posted January 14, 2012 Ohh sorry about that, Here is it.. for(set .@i,0;.@i<getarraysize(.@gmcid);set .@i,.@i+1) { if(isloggedin(.@gmaid[.@i])) getitem 12628,1,.@gmaid[.@i]; } Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted January 14, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Author Share Posted January 14, 2012 function script AllGuildMemberEvent { if(!set(.@gid,getcastledata(getarg(0),1))) return; query_sql("select account_id, char_id from `guild_member` where guild_id = '"+.@gid+"'", .@gmaid, .@gmcid); for(set .@i,0;.@i<getarraysize(.@gmcid);set .@i,.@i+1) { if( isloggedin (.@gmaid[.@i])){ getitem 607.10,.@gmaid[.@i]; set #CASHPOINTS,#CASHPOINTS+10; } - script AGME -1,{ OnAGME: setarray .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05"; setarray .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05"; setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05"; setarray .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; for( set .@i,0; .@i <= 19; set .@i, .@i+1) { callfunc "AllGuildMemberEvent",.@maps$[.@i],1, "System","WoE Victory Reward","Congratulations! Your guild succeeded in occupying "+ getcastlename(.@maps$[.@i]) +". This is your rewards.", 501,1,1,0, "[You got a mail!! Please relogin to reupdate your mail list.]"; } end; } script does not work properly, please justification, thanks Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 14, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Friday at 11:44 PM Share Posted January 14, 2012 please be specific about the error... it's working fine with me, but I'm not using the cash point thing... i think it's because of the cash points.. Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted January 14, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Author Share Posted January 14, 2012 I have tried deleting Cashpoint result remains the same, as shown below Error Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 14, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Friday at 11:44 PM Share Posted January 14, 2012 You're missing 2 right curlys.. LOL //Author : Goddameit //Version : 2011/12/16 - 01:04 function script AllGuildMemberEvent { if(!set(.@gid,getcastledata(getarg(0),1))) return; query_sql("select account_id, char_id from `guild_member` where guild_id = '"+.@gid+"'", .@gmaid, .@gmcid); for(set .@i,0;.@i<getarraysize(.@gmcid);set .@i,.@i+1) { if(isloggedin(.@gmaid[.@i])) getitem 12628,1,.@gmaid[.@i]; } } - script AGME -1,{ OnAGME: setarray .@maps$[0],"aldeg_cas01","aldeg_cas02","aldeg_cas03","aldeg_cas04","aldeg_cas05"; setarray .@maps$[5],"gefg_cas01","gefg_cas02","gefg_cas03","gefg_cas04","gefg_cas05"; setarray .@maps$[10],"payg_cas01","payg_cas02","payg_cas03","payg_cas04","payg_cas05"; setarray .@maps$[15],"prtg_cas01","prtg_cas02","prtg_cas03","prtg_cas04","prtg_cas05"; for( set .@i,0; .@i <= 19; set .@i, .@i+1) { callfunc "AllGuildMemberEvent",.@maps$[.@i],0, "System","WoE Victory Reward","Congratulations! Your guild succeeded in occupying "+ getcastlename(.@maps$[.@i]) +". This is your rewards.", 501,1,1,0, "[You got a mail!! Please relogin to reupdate your mail list.]"; } end; } Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted January 14, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Author Share Posted January 14, 2012 wow works fine:) where was I doing wrong? Please let me know, thanks. Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 14, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Friday at 11:44 PM Share Posted January 14, 2012 You missed 1 curly, {for(set .@i,0;.@i<getarraysize(.@gmcid);set .@i,.@i+1) if( isloggedin (.@gmaid[.@i])){ getitem 607.10,.@gmaid[.@i]; set #CASHPOINTS,#CASHPOINTS+10; } Should be for(set .@i,0;.@i<getarraysize(.@gmcid);set .@i,.@i+1) { if(isloggedin(.@gmaid[.@i])) getitem 12628,1,.@gmaid[.@i]; } }//-missing curly Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted January 19, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Author Share Posted January 19, 2012 thanks very much Quote Link to comment Share on other sites More sharing options...
Yasunari Ishibashi Posted January 21, 2012 Group: Members Topic Count: 49 Topics Per Day: 0.01 Content Count: 157 Reputation: 2 Joined: 01/06/12 Last Seen: August 25, 2014 Author Share Posted January 21, 2012 after i try why not give gifts after WoE ends? when no error occurs, please help, Quote Link to comment Share on other sites More sharing options...
Elijah23 Posted January 21, 2012 Group: Members Topic Count: 46 Topics Per Day: 0.01 Content Count: 292 Reputation: 17 Joined: 12/12/11 Last Seen: Friday at 11:44 PM Share Posted January 21, 2012 Working with me... Maybe change your callfunc to this code.. callfunc "AllGuildMemberEvent",.@maps$[.@i],0; Quote Link to comment Share on other sites More sharing options...
GM Incarnation Posted June 14, 2012 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 75 Reputation: 0 Joined: 03/19/12 Last Seen: October 25, 2012 Share Posted June 14, 2012 Sir wakoko321 thank you but Can you post it in pastebin? how to put in Toasty's Woe Controller and fine the line announce "The War Of Emperium is over!",bc_all; donpcevent strnpcinfo(3)+"::OnDisplayOwners"; Thanks. Quote Link to comment Share on other sites More sharing options...
Lanz Posted June 16, 2012 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 32 Reputation: 2 Joined: 11/22/11 Last Seen: October 7, 2016 Share Posted June 16, 2012 (edited) I tested the script but it gives me 22 times of the said prize.. Ex. you got Yggdrasil Seed(1). you got Yggdrasil Seed(1). you got Yggdrasil Seed(1). So i will recieve 22 ygg seed after woe?weird... Need Help.. There is no error in the map server.. Thanks in advance Edited June 16, 2012 by Lanz Quote Link to comment Share on other sites More sharing options...
GM Incarnation Posted June 20, 2012 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 75 Reputation: 0 Joined: 03/19/12 Last Seen: October 25, 2012 Share Posted June 20, 2012 anyone pls help me i already try this script but nothing happen.after woe nothing reward will received. http://pastebin.com/pavZfN8T Quote Link to comment Share on other sites More sharing options...
IusReservoir Posted June 20, 2012 Group: Members Topic Count: 3 Topics Per Day: 0.00 Content Count: 32 Reputation: 1 Joined: 01/22/12 Last Seen: October 31, 2020 Share Posted June 20, 2012 @wakoko321 sir Can You share Your Script with full atachmen not with quote? Quote Link to comment Share on other sites More sharing options...
PapaZola Posted July 3, 2012 Group: Members Topic Count: 318 Topics Per Day: 0.07 Content Count: 925 Reputation: 33 Joined: 12/05/11 Last Seen: September 20, 2023 Share Posted July 3, 2012 yeah need this too Quote Link to comment Share on other sites More sharing options...
Euphy Posted July 3, 2012 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 July 3, 2012 Goddameit's updated script: http://pastebin.com/raw.php?i=Mdm6iFaR Quote Link to comment Share on other sites More sharing options...
GM Incarnation Posted July 3, 2012 Group: Members Topic Count: 10 Topics Per Day: 0.00 Content Count: 75 Reputation: 0 Joined: 03/19/12 Last Seen: October 25, 2012 Share Posted July 3, 2012 Goddameit's updated script: http://pastebin.com/raw.php?i=Mdm6iFaR Hi Sir Euphy Pls advise where i must put this script? Thanks Quote Link to comment Share on other sites More sharing options...
Emistry Posted July 3, 2012 Group: Forum Moderator Topic Count: 93 Topics Per Day: 0.02 Content Count: 10017 Reputation: 2369 Joined: 10/28/11 Last Seen: Tuesday at 05:38 PM Share Posted July 3, 2012 http://rathena.org/wiki/Adding_a_Script Quote Link to comment Share on other sites More sharing options...
Question
Yasunari Ishibashi
So the script function is to give the gift of each end of WoE to the owner of a certain castle & gifts directly given to all players in a guild that won the WoE, so I want to give gifts Item ID: 7539 & Cashpoint +10 every time WoE ends.
only an online player who get the prize.
if anyone can make a simple script?
thanks.
Edited by Yasunari IshibashiLink to comment
Share on other sites
Top Posters For This Question
14
11
10
8
Popular Days
Jul 5
28
Jan 14
9
Jul 3
9
Jul 4
4
Top Posters For This Question
GM Incarnation 14 posts
Ragnar Lothbrok 11 posts
Yasunari Ishibashi 10 posts
QQfoolsorellina 8 posts
Popular Days
Jul 5 2012
28 posts
Jan 14 2012
9 posts
Jul 3 2012
9 posts
Jul 4 2012
4 posts
Posted Images
64 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.