Jump to content
  • 0

WoE Reward


Yasunari Ishibashi

Question


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

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 Ishibashi
Link to comment
Share on other sites

  • Answers 64
  • Created
  • Last Reply

Top Posters For This Question

Recommended Posts


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

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 by wakoko321
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

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 by Yasunari Ishibashi
Link to comment
Share on other sites


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

:( ???

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;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

What if I use the Toasty WoE?

where I should put donpcevent "AGME:: OnAGME";?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

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

{

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

Ohh sorry about that,

Here is it.. /no1

for(set .@i,0;.@i<getarraysize(.@gmcid);set .@i,.@i+1)
{
 if(isloggedin(.@gmaid[.@i]))
 getitem 12628,1,.@gmaid[.@i];
 }

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

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.. /no1

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

I have tried deleting Cashpoint result remains the same, as shown below Error

Error.png

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

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;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

wow works fine:)

where was I doing wrong? Please let me know, thanks.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

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

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  49
  • Topics Per Day:  0.01
  • Content Count:  157
  • Reputation:   2
  • Joined:  01/06/12
  • Last Seen:  

after i try why not give gifts after WoE ends?

when no error occurs, please help,

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  46
  • Topics Per Day:  0.01
  • Content Count:  292
  • Reputation:   17
  • Joined:  12/12/11
  • Last Seen:  

Working with me...

screenexcelsisro004.jpg

Maybe change your callfunc to this code..

callfunc "AllGuildMemberEvent",.@maps$[.@i],0;

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  75
  • Reputation:   0
  • Joined:  03/19/12
  • Last Seen:  

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.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   2
  • Joined:  11/22/11
  • Last Seen:  

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 by Lanz
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  75
  • Reputation:   0
  • Joined:  03/19/12
  • Last Seen:  

anyone pls help me i already try this script but nothing happen.after woe nothing reward will received.

http://pastebin.com/pavZfN8T

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  32
  • Reputation:   1
  • Joined:  01/22/12
  • Last Seen:  

@wakoko321

sir Can You share Your Script with full atachmen not with quote? :D

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  925
  • Reputation:   32
  • Joined:  12/05/11
  • Last Seen:  

yeah need this too

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

Goddameit's updated script: http://pastebin.com/raw.php?i=Mdm6iFaR

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  75
  • Reputation:   0
  • Joined:  03/19/12
  • Last Seen:  

Goddameit's updated script: http://pastebin.com/raw.php?i=Mdm6iFaR

Hi Sir Euphy

Pls advise where i must put this script?

Thanks

Link to comment
Share on other sites


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

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