Jump to content
  • 0

Help Edit This Script


Onitsuka

Question


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   0
  • Joined:  02/23/12
  • Last Seen:  

Help me to edit this script,

autorecall all guild member win to sumwhere after woe,

then i will place then mailbox there,

thanx ^_^

//Author : Goddameit
//Version : 2011/7/13 - 21:53
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]))
		message rid2name(.@gmaid[.@i]),getarg(9);
	if(!isloggedin(.@gmaid[.@i])&&!getarg(1))
		continue;
	query_sql "insert into mail ( send_name, dest_id, title, message, nameid, amount, identify, zeny, time ) values ( '"+escape_sql(getarg(2))+"',"+.@gmcid[.@i]+", '"+escape_sql(getarg(3))+"', '"+escape_sql(getarg(4))+"', "+getarg(5)+", "+getarg(6)+", "+getarg(7)+", "+getarg(8)+", unix_timestamp( now() ) )";
}
return;
}
- script AGME -1,{
OnAgitEnd:
setarray .@maps$[0],"aldeg_cas02";
setarray .@maps$[10],"payg_cas04";
setarray .@maps$[15],"prtg_cas03";
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.",
		7539,10,1,0,
		"[You got a mail!! Please relogin to reupdate your mail list.]";
}
end;
}

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


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

try this

- script Sample -1,{
OnAgitEnd:
setarray .Map$,"pay_gcas04","prtg_cas03","aldeg_cas02";
for( set .@i,0; .@i < getarraysize( .Map$ ); set .@i,.@i + 1 )
warpguild "prontera",155,181,getcastledata( .Map$[.@i],1 );
end;
}

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  13
  • Topics Per Day:  0.00
  • Content Count:  33
  • Reputation:   0
  • Joined:  02/23/12
  • Last Seen:  

thanx emistry :)

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:  

Hi Emistry

this code put in where? and your script change to where. please advise. Thanks.

//Author : Goddameit

//Version : 2011/7/13 - 21:53

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]))

message rid2name(.@gmaid[.@i]),getarg(9);

if(!isloggedin(.@gmaid[.@i])&&!getarg(1))

continue;

query_sql "insert into mail ( send_name, dest_id, title, message, nameid, amount, identify, zeny, time ) values ( '"+escape_sql(getarg(2))+"',"+.@gmcid[.@i]+", '"+escape_sql(getarg(3))+"', '"+escape_sql(getarg(4))+"', "+getarg(5)+", "+getarg(6)+", "+getarg(7)+", "+getarg(8)+", unix_timestamp( now() ) )";

}

return;

}

- script AGME -1,{

OnAgitEnd:

setarray .@maps$[0],"aldeg_cas02";

setarray .@maps$[10],"payg_cas04";

setarray .@maps$[15],"prtg_cas03";

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

7539,10,1,0,

"[You got a mail!! Please relogin to reupdate your mail list.]";

}

end;

}

Edited by Incarnation
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...