Jump to content
  • 0

Battleground Registration Help Please!


Question

Posted (edited)

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

2 answers to this question

Recommended Posts

Posted

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.

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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...