Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 01-18-2009, 07:12 PM
[email protected] jamerson61894@yahoo.com is offline
Banned
Join Date: Jul 2008
Posts: 83
jamerson61894@yahoo.com is an unknown quantity at this point
New Event Script help

Ok, I have this event script that when the et hosts the event, it come sup on everyones screen, and the player clicks it and gets warped to the event level. For some reason, only 2/10 of my players on a ratio scale are seeing the thing come up. Can someone help me make it to where everyone can see it? here is the script:
PHP Code:
function onActionServerSide(cmd) {
  
/* Set Event */
  
if (cmd == "setevent") {
    
EventList();
    
this.ec this.event.index(params[1]);
    if (
this.ec > -1) {
      
serverr.eventname this.event[this.ec];
      
serverr.eventlevel this.event[this.ec+1];
      
serverr.eventx this.event[this.ec+2];
      
serverr.eventy this.event[this.ec+2];
    }
    else {
      
player.chat "Event Not Found"/* Check below in EventList(); */
    
}
  }    
  
/* Set Message */
  
else if (cmd == "setmessage") {
    if (
serverr.eventname != NULL) {
      
serverr.eventmessage params[1];
      for (
pl allplayers) {
        
pl.triggerclient("-Esystem","EventSet");
      }
    }
  }
  else if (
cmd == "clear") {
    
serverr.eventname "Events Team Staff";
    
serverr.eventlevel "daisuke_events-spar.nw";
    
serverr.eventx     "33";
    
serverr.eventy     "27";
    
serverr.eventmessage "Events Team Staff";
    for (
pl allplayers) {
        
pl.triggerclient("-Esystem","Clear");
    }
  }
  else if (
cmd == "warptoevent") {
    
setlevel2(serverr.eventlevel,serverr.eventx,serverr.eventy);
  }       
}

function 
EventList() {
  
//Eventname,level,x,y
  
this.event = {
    
"Events Team Staff","daisuke_events-spar.nw",33,27,
    
"Events Team Staff","daisuke_events-spar.nw",33,27,
  };
}



//#CLIENTSIDE
function onActionClientSide() {
  if (
params[0] == "EventSet") {
    
setevent();
  }
  else if (
params[0] == "Clear") {
    
hideimg(201);
    
ebutton.hide();
  }
}

function 
onPlayerchats() {
if (
player.guild == "Events Team") {
  if (
player.chat.starts("/setevent")) {
    
triggerserver("gui","-Esystem","setevent",player.chat.substring(10));
  }
  else if (
player.chat.starts("/eventhost 1")) {
    
triggerserver("gui","-Esystem","setmessage",player.chat.substring(9));
  }
  else if (
player.chat.starts("/clear1")) {
    
triggerserver("gui","-Esystem","clear");
  } }   
}

function 
onCreated(){
  new 
GuiButtonCtrl(ebutton) {
    
profile "GuiBlueButtonProfile";
    
x       screenwidth 1010;
    
y       screenheight 80;
    
extent  "150 20";
    
text    "Click Here To Play The Event!";
    
visible false;
  }  
}

function 
setevent() {
  
ebutton.show();
  
showText20110screenheight-40"Verdana""b"serverr.eventname@": " serverr.eventmessage).layer=4;
}

function 
ebutton.onAction() {
  
triggerserver("gui","-Esystem","warptoevent");

Someoen please help me.

-jamerson

thanks <3

Last edited by Skyld; 01-18-2009 at 07:20 PM.. Reason: Placed the code in [PHP][/PHP] tags
Reply With Quote
  #2  
Old 01-18-2009, 07:14 PM
Deas_Voice Deas_Voice is offline
Deas
Deas_Voice's Avatar
Join Date: Jun 2007
Location: Sweden
Posts: 2,264
Deas_Voice is a jewel in the roughDeas_Voice is a jewel in the rough
Send a message via AIM to Deas_Voice Send a message via MSN to Deas_Voice Send a message via Yahoo to Deas_Voice
please learn how to use [PHP] tags.
__________________
.
WTF is real life, and where do I Download it?
There is no Real Life, just AFK!
since 2003~
I Support~
ღAeonღ | ღTestbedღ | ღDelteriaღ

if you are going to rep me, don't be an idiot, leave your name!
I got nothing but love for you
Reply With Quote
  #3  
Old 01-18-2009, 07:17 PM
[email protected] jamerson61894@yahoo.com is offline
Banned
Join Date: Jul 2008
Posts: 83
jamerson61894@yahoo.com is an unknown quantity at this point
Could you help me?
Reply With Quote
  #4  
Old 01-18-2009, 07:30 PM
Chompy Chompy is offline
¯\(º_o)/¯
Chompy's Avatar
Join Date: Sep 2006
Location: Norway
Posts: 2,815
Chompy is just really niceChompy is just really niceChompy is just really nice
Send a message via MSN to Chompy
Change you triggerclient()'s into:

PHP Code:
pl.triggerclient("gui""-Esystem""EventSet");
pl.triggerclient("gui""-Esystem""Clear"); 
And make sure all player's has the weapon npc the script is located in.
__________________
Reply With Quote
  #5  
Old 01-18-2009, 07:40 PM
[email protected] jamerson61894@yahoo.com is offline
Banned
Join Date: Jul 2008
Posts: 83
jamerson61894@yahoo.com is an unknown quantity at this point
That didnt work.
Reply With Quote
  #6  
Old 01-18-2009, 07:41 PM
cbk1994 cbk1994 is offline
the fake one
cbk1994's Avatar
Join Date: Mar 2003
Location: San Francisco
Posts: 10,718
cbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond reputecbk1994 has a reputation beyond repute
Send a message via AIM to cbk1994
What's the name of the weapon? Do all the players have it?
__________________
Reply With Quote
  #7  
Old 01-18-2009, 09:05 PM
xXziroXx xXziroXx is offline
Malorian
xXziroXx's Avatar
Join Date: May 2004
Posts: 5,289
xXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant futurexXziroXx has a brilliant future
Please stop using other peoples script, that probably aren't even aware of you using it, without giving them credit.
__________________
Follow my work on social media post-Graal:Updated august 2025.
Reply With Quote
  #8  
Old 01-18-2009, 10:30 PM
Sage_Shadowbane Sage_Shadowbane is offline
Graal Developer
Sage_Shadowbane's Avatar
Join Date: Mar 2004
Posts: 585
Sage_Shadowbane will become famous soon enough
Lol, funny.. that script reminds me of an editted version of my Event Tool.. heh. You should really try to actually create your own scripts.. It's wierd how quickly scripts get passed around without the actual creators consent.
Reply With Quote
  #9  
Old 01-18-2009, 10:58 PM
Twinny Twinny is offline
My empire of dirt
Twinny's Avatar
Join Date: Mar 2006
Location: Australia
Posts: 2,422
Twinny is just really niceTwinny is just really nice
Send a message via AIM to Twinny
It looks like the script I posted into the Code Gallery ages ago....

Jamerson, how bout you actually learn to script rather then get people to edit other peoples scripts for your benefit?
Reply With Quote
  #10  
Old 01-19-2009, 05:00 PM
Pelikano Pelikano is offline
Registered User
Pelikano's Avatar
Join Date: Oct 2008
Posts: 1,133
Pelikano has a little shameless behaviour in the past
People should stop helping him.. lol

Btw. Try Twinny's Guide, it's kewl
Reply With Quote
  #11  
Old 01-19-2009, 05:30 PM
Soala Soala is offline
Ideas on Fire
Soala's Avatar
Join Date: Jun 2007
Location: In my head
Posts: 3,208
Soala is a jewel in the roughSoala is a jewel in the rough
Yeah seriously, if you can't make your own scripts, at least learn the basics to fix them yourself =X It's like the 6th thread for a script help from you within a week


Just hire a scripter !
Reply With Quote
Reply


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 12:26 PM.


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