Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting > New Scripting Engine (GS2)
FAQ Members List Calendar Today's Posts

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 02-04-2012, 04:42 PM
clarke119 clarke119 is offline
Registered User
Join Date: May 2010
Posts: 23
clarke119 is on a distinguished road
Chance Event Trouble

Hey guys, Having trouble making my chance event.

On the different boxes ie. 1, 2 , 3, 4, 5, 6, 7, 8 I have this code:

NPC Code:
function onCreated()
{
this.setShape(1, 240, 205);
}
function onPlayerTouchsMe()
{
clientr.box=1;
}



And I'm using this for kick:

NPC Code:
function onPlayerChats()
{
if (player.guild == "Events Team" || player.guild == "Events Admin" || player.queryRight("events")) {
if (player.chat.starts("/kick")) { // chat starts with /kick
temp.num = player.chat.substring(6).trim(); // find the number the ET said

for (temp.pl : players) { // loop through each player
if (pl.client.chance == num) { // it's the number the ET called
pl.setlevel2("lost-osl1.nw",30.5,10.8); // warp that player (note "pl."setLevel2)
}
}
}
}
}



Having lots of trouble, such as on kick it texts everyone on level to kick location etc..

Thanks in advance,
__________________
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 02:07 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.