Jump to content
  • 0

Emperium Breakers name


darking123

Question


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

announce "The [" + getcastlename(strnpcinfo(2)) + "] castle has been conquered by [" + strcharinfo(0) + "] from the [" + getguildName(.@GID) + "] guild.",bc_all;

but i get this error

[Debug]: script_rid2sd: fatal error ! player not attached!
[Warning]: script:get_val: cannot access player variable 'killerid' defaulting to 0

And it doesnt shows even the guild that conquered the castle (shows nothing)

i am using eathena svn

Link to comment
Share on other sites

3 answers to this question

Recommended Posts


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

/bo Post the few lines before announce
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  15
  • Topics Per Day:  0.00
  • Content Count:  161
  • Reputation:   31
  • Joined:  12/06/11
  • Last Seen:  

there's no player Attached so strcharinfo(0) obviously doesn't work :P. please show us more of the code so we can help you.

edit:

change

// Respawn the Emperium, and display new owners.
sleep 500; // Slow down script execution slightly.
if( agitcheck() )
	donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena";
sleep 7000;

announce "The [" + getcastlename(strnpcinfo(2)) + "] castle has been conquered by [" + strcharinfo(0) + "] from the [" + getguildName(.@GID) + "] guild.",bc_all;

end;

to

// Respawn the Emperium, and display new owners.
sleep2 500; // Slow down script execution slightly.
if( agitcheck() )
	donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena";
sleep2 7000;

announce "The [" + getcastlename(strnpcinfo(2)) + "] castle has been conquered by [" + strcharinfo(0) + "] from the [" + getguildName(.@GID) + "] guild.",bc_all;

end;

The players RID detaches because of the Sleep command, sleep2 does not detach the RID. However, if the player warps out before the announcement is made the rid also detaches so you could do the following instead.

.@p$ = strcharinfo(0);
// Respawn the Emperium, and display new owners.
sleep 500; // Slow down script execution slightly.
if( agitcheck() )
	donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena";
sleep 7000;

announce "The [" + getcastlename(strnpcinfo(2)) + "] castle has been conquered by [" + .@p$ + "] from the [" + getguildName(.@GID) + "] guild.",bc_all;

end;

Edited by Jeroen
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  318
  • Topics Per Day:  0.07
  • Content Count:  931
  • Reputation:   13
  • Joined:  12/20/11
  • Last Seen:  

i have my code edited

here it is..

will these work just fine??

// Respawn the Emperium, and display new owners.
 set .@breaker$, strcharinfo(0);
 // Respawn the Emperium, and display new owners.
 if (agitcheck()) {
   sleep2 500; // Slow down script execution slightly.
   donpcevent "Agit#"+strnpcinfo(2)+"::OnStartArena";
   announce "The [" + getcastlename(strnpcinfo(2)) + "] castle has been conquered by [ "+.@breaker$+" ] of the [" + getguildName(.@GID) + "] guild.",bc_all;
   end;
 }

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