Jump to content
  • 0

Battleground Registration Help Please!


GM Freya

Question


  • Group:  Members
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  16
  • Reputation:   0
  • Joined:  02/20/12
  • Last Seen:  

prontera,164,177,2	script	Guillaume#Blue	420,{
	end;
OnInit:
	waitingroom "Battle Station 3 Players",3,"Guillaume#Blue::OnEnter",1,0,80,99;
	end;
OnEnter:
	set Bat_Team,1;
	donpcevent "BG_Queue_Join::OnDoJoin";
	end;
OnLeave:
	set Bat_Team,0;
	donpcevent "BG_Queue_Join::OnDoLeave";
	end;
}

prontera,147,177,7	script	Croix#Red	416,{
	end;
OnInit:
	waitingroom "Battle Station 3 Players",3,"Croix#Red::OnEnter",1,0,80,99;
	end;
OnEnter:
	set Bat_Team,2;
	donpcevent "BG_Queue_Join::OnDoJoin";
	end;
OnLeave:
	set Bat_Team,0;
	donpcevent "BG_Queue_Join::OnDoLeave";
	end;
}

 

Anyone can help me on the script that I made for my Battleground Registration?

 

I want you to re-edit this one that will trigger OnEnter in every player who enter the waiting room and OnLeave if player leave the waiting room.

 

My main problem here is when I enter the waiting room this one will appear to the console and nothing will happen.

[Error]: script_rid2sd: fatal error ! player not attached!
[Debug]: Function: set (2 parameters):
[Debug]: Data: variable name='Bat_Team'
[Debug]: Data: number value=2
[Debug]: Source (NPC): Croix#Red at prontera (147,177)
[Error]: script:set: no player attached for player variable 'Bat_Team'

please tell me if I post in the wrong section.

Edited by GM Xeon
Link to comment
Share on other sites

2 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  0
  • Topics Per Day:  0
  • Content Count:  11
  • Reputation:   0
  • Joined:  12/13/12
  • Last Seen:  

This issue resolve?

Link to comment
Share on other sites


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

the npc event run when a player joined the chatroom .... it run independently ... no players is attached to the script when it's running.

 

is it you trying to set / check player has a battleground or not ?

you try to make the player save a variable to indicate they currently have a battleground group id attached ?

 

if yes...then you can simply use this

if( getcharid(4) )  // has battleground attached.
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...