nuna 2 Posted April 4, 2015 i have this problem. Im using this - script KoE -1,{ if ( getcastledata("guild_vs1", 1) == getcharid(2) ) {getitem 30206,1; // configure prize} else {end;} As an automatic giver for KoE. but it display error script_rid2sd: fatal error ! player not attached! Quote Share this post Link to post Share on other sites
0 Angelmelody 221 Posted April 4, 2015 try this //////THISSSSSS ONEgetguildmember(getcastledata("guild_vs1", 1),2);for(.@i=0;.@i< $@guildmembercount;.@i++) getitem 30206,1,$@guildmemberaid[.@i];//////THISSSSSS ONE 2 Aeromesi and nuna reacted to this Quote Share this post Link to post Share on other sites
0 Aeromesi 180 Posted April 4, 2015 Post the whole script. It would give us more information Quote Share this post Link to post Share on other sites
0 nuna 2 Posted April 4, 2015 - script KoE -1,{OnInit: disablenpc "The King"; end;OnWhisperGlobal: if ( getgmlevel() < 99 ) end; else if ( compare ( @whispervar0$, "on" ) ) goto L_start; else if ( compare ( @whispervar0$, "off" ) ) goto L_End; else end; L_End:OnClock0030:OnClock0130:OnClock0230:OnClock0330:OnClock0430:OnClock0530:OnClock0630:OnClock0730:OnClock0830:OnClock0930:OnClock1030:OnClock1130:OnClock1230:OnClock1330:OnClock1430:OnClock1530:OnClock1630:OnClock1730:OnClock1830:OnClock1930://OnClock2030://OnClock2130:OnClock2230:OnClock2330: announce "The King of Emperium Hill is over!", 0; agitend; enablenpc "Exit"; disablenpc "The King"; killmonsterall "guild_vs1";//////THISSSSSS ONEif ( getcastledata("guild_vs1", 1) == getcharid(2) ) {getitem 30206,1; // configure prize here nERO ITEMS} else {end;}//////THISSSSSS ONE end;L_start:OnClock0000:OnClock0100:OnClock0200:OnClock0300:OnClock0400:OnClock0500:OnClock0600:OnClock0700:OnClock0800:OnClock0900:OnClock1000:OnClock1100:OnClock1200:OnClock1300:OnClock1400:OnClock1500:OnClock1600:OnClock1700:OnClock1800:OnClock1900://OnClock2000://OnClock2100:OnClock2205:OnClock2300: announce "The King of Emperium Hill has begun!", 0; agitstart; enablenpc "The King"; disablenpc "Exit"; setcastledata "guild_vs1", 1, 0;// getcastledata "guild_vs1", 0, "::OnRevKoE"; // I think this command broken donpcevent "::OnRevKoE"; maprespawnguildid "guild_vs1", 0, 6; monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead"; end;OnEmpDead: set .@gid, getcharid(2); setcastledata "guild_vs1", 1, .@gid; announce "The current King of Emperium Hill castle has been conquered by ["+strcharinfo(0)+"] of the [" + strcharinfo(2) + "] guild.", 0;// getcastledata "guild_vs1", 0, "::OnRevKoE"; donpcevent "::OnRevKoE"; maprespawnguildid "guild_vs1", .@gid, 6; sleep 500; if ( agitcheck() == 0 ) monster "guild_vs1",49,49,"EMPERIUM",1288,1,"KoE::OnEmpDead"; end;}// KoE Entrancephtownall,200,181,4 script The King 973,{ mes "[The King]"; if ( getcharid(2) == 0 ) { mes "You must have a guild to participate in the ^FF0000King of Emperium Hill Tournament^000000."; close; } mes "Hello."; mes "Would you like to participate in the ^FF0000King of Emperium Hill Tournament^000000?"; next; if ( select ( "Yes", "No" ) == 2 ) close; switch( rand(1,4) ){ case 1: warp "guild_vs1", 50, 88; end; case 2: warp "guild_vs1", 88, 50; end; case 3: warp "guild_vs1", 50, 11; end; case 4: warp "guild_vs1", 11, 50; end; }}// KoE Exitguild_vs1,49,56,5 script Exit 51,{ mes "[Exit]"; mes "See ya."; next; warp "prontera",213,168; close;}// Flagsguild_vs1,49,38,4 script King of Emperium Hill#1::koe_flag 722,{ set .@gid, getcastledata("guild_vs1",1); if ( .@gid == 0 ) end; mes "[King of Emperium Hill]"; mes "The Current King of Emperium Hill is the ["+ getguildname(.@gid) +"] guild."; close;OnRevKoE: flagemblem getcastledata("guild_vs1",1); end;}guild_vs1,61,49,6 duplicate(koe_flag) King of Emperium Hill#2 722guild_vs1,38,49,2 duplicate(koe_flag) King of Emperium Hill#3 722guild_vs1,49,61,0 duplicate(koe_flag) King of Emperium Hill#4 722 Ok sir thank you for your interest here it is. Quote Share this post Link to post Share on other sites
0 Aeromesi 180 Posted April 4, 2015 OnInit labels will execute at server start up, without players being attachedIt's going to read "disablenpc" like you already started the event, meaning you need to be attached to the npc, which you didn't because the server just started up. I think it has something to do with the OnInit label. Someone correct me if I'm wrong Quote Share this post Link to post Share on other sites
0 RodRich 6 Posted April 4, 2015 OnInit labels will execute at server start up, without players being attached It's going to read "disablenpc" like you already started the event, meaning you need to be attached to the npc, which you didn't because the server just started up. I think it has something to do with the OnInit label. Someone correct me if I'm wrong Yeah that's it!! i have this problem. Im using this - script KoE -1,{ if ( getcastledata("guild_vs1", 1) == getcharid(2) ) {getitem 30206,1; // configure prize} else {end;} As an automatic giver for KoE. but it display error script_rid2sd: fatal error ! player not attached! Who should get the item?? 'Beacause like he said: It's a automatic script ,and at the began there's no player attached!! Quote Share this post Link to post Share on other sites
0 nuna 2 Posted April 4, 2015 try this //////THISSSSSS ONEgetguildmember(getcastledata("guild_vs1", 1),2);for(.@i=0;.@i< $@guildmembercount;.@i++) getitem 30206,1,$@guildmemberaid[.@i];//////THISSSSSS ONE Hello thank you for this it worked!. Thank you for all your replies. I know understand it Quote Share this post Link to post Share on other sites
0 Aeromesi 180 Posted April 4, 2015 try this //////THISSSSSS ONEgetguildmember(getcastledata("guild_vs1", 1),2);for(.@i=0;.@i< $@guildmembercount;.@i++) getitem 30206,1,$@guildmemberaid[.@i];//////THISSSSSS ONE Hello thank you for this it worked!. Thank you for all your replies. I know understand it No problem, Angelmelody handled it better though, I just tried to explain it to you =) Quote Share this post Link to post Share on other sites
0 nuna 2 Posted April 4, 2015 you are all very good sir. Quote Share this post Link to post Share on other sites
i have this problem.
Im using this
As an automatic giver for KoE.
but it display error
Share this post
Link to post
Share on other sites