Show Mapusers

JoyRo

New member
Messages
120
Points
0
Location
Netherlands
Emulator
Hello,

i have a script that shows you how many players are online at a certain map.
But i am getting a script_rid2sd fatal error player not attached.

Can any 1 help me.

Also when i click the npc it warps me to the area.

Code:
//========= Event Area========
prontera,167,169,3	script	Event Area	2_BULLETIN_BOARD,{
	OnInit:	
	OnTimer1000:
	delwaitingroom;
	waitingroom getmapusers("prontera")+" player"+( getmapusers("prontera") > 1 ? "s":"") +" in Event Area", 0;
OnTouch:
        warp "prontera",99,121;
        end;
}
 
imho the script is not meet what you need, try this

//========= Event Area========
prontera,167,169,3 script Event Area 2_BULLETIN_BOARD,{
warp "prontera",99,121;
end;

OnInit:
OnTimer1000:
delwaitingroom;
waitingroom getmapusers("prontera")+" player"+( getmapusers("prontera") > 1 ? "s":"") +" in Event Area", 0;
initnpctimer;
end;
}

OnTouch is used if you want script trigered when someone appeared on area around the npc, and if you use the OnTimerXX: you need to init the timer, script above will re-check the amount of player on prontera every 1 second and you will be warped when you click the npc

 
Back
Top