Graal Forums  

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

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 10-25-2005, 09:56 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
prob.

For some odd reason, no one but me can see this when I say something (this is for anouncing events, but no one but the speaker can see it. The weapon that triggers this is below the first script, the top one is the part that should display text, and allow warping, but it doesn't x_X This may seem repetitive, wasn't sure which parts would be better, its only at one part i think
NPC Code:
//#CLIENTSIDE
if(actionclientside){
if(strequals(#p(0),eventsmessage)){
play extra.wav;
sleep .05;
play extra.wav;
for(h=0;h<200;h++){
showtext 33433,10,430,Arial,b,#s(serverr.eventsmessage);
changeimgvis 33433,10;
timeout=.05;
if (timeout&&playerchats&&strequals(#c,/warp)){setlevel2 eventswarp_darkrival2.nw,30,35;}
sleep .05;}
hideimg 33433;
}
}


NPC Code:
if(actionserverside){
if(strequals(#p(0),call)){
setstring serverr.eventsmessage,#T(#e(8,-1,#c)) Say /warp to warp to this event!;
triggeraction 0,0,clientside,-eventsmessage,eventsmessage;
}
}
//#CLIENTSIDE
if(weaponfired){
say2 Say /message <message>#b
to send a message to all players#b
ex: /message Holding Event...Spar!#b
}
if(isweapon&&playerchats&&startswith(/message,#c)){
triggeraction 0,0,serverside,Events Team/Message,call;
triggeraction 0,0,clientside,-eventsmessage,eventsmessage;
}

Reply With Quote
  #2  
Old 10-26-2005, 01:56 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
again, that triggeraction clientside only triggers to the current player =\
__________________
Reply With Quote
  #3  
Old 10-26-2005, 02:21 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
what should be used instead?
Reply With Quote
  #4  
Old 10-26-2005, 02:26 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
With the current way you have it set up, the easiest way is to have the serverside part loop through each player and trigger clientside.

A not as laggy way would be to have some kind of timeout that updates the showtext to 'serverr.eventsmessage'.

But what's up with this (in the actionclientside)?
PHP Code:
if (timeout&&playerchats&&strequals(#c,/warp)){setlevel2 eventswarp_darkrival2.nw,30,35;} 
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #5  
Old 10-26-2005, 03:00 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
that was something I'm testing, so the player can warp to the event house when it comes up by saying /warp
wow, just realized how poorly thats formatted, sorry
loop through each player, like:
for(i=0;i<allplayerscount;i++)?
or something else?
Reply With Quote
  #6  
Old 10-26-2005, 03:55 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by excaliber7388
loop through each player, like:
for(i=0;i<allplayerscount;i++)?
Yeah, with using 'with (allplayers[i])'.

This thread reminds me of how much GS2 is superior to GS1 .
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #7  
Old 10-26-2005, 05:25 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally Posted by napo_p2p
Yeah, with using 'with (allplayers[i])'.

This thread reminds me of how much GS2 is superior to GS1 .
2>1
but i like gs1 =(
__________________
Reply With Quote
  #8  
Old 10-26-2005, 11:02 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
hmmm, where would I put the loop with playerscount, which NPC, and what part of it?
Reply With Quote
  #9  
Old 10-26-2005, 11:38 PM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
think logically, you want to trigger it to every player on the server.
__________________
Reply With Quote
  #10  
Old 10-26-2005, 11:56 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
hmmmm the first one? XD i tried it there and it didn't work right, so i figured I'd ask
Reply With Quote
  #11  
Old 10-27-2005, 12:02 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
*sigh*

The problem with this:
triggeraction 0,0,clientside,-eventsmessage,eventsmessage; is:
Quote:
Originally Posted by ZeLpH_MyStiK
again, that triggeraction clientside only triggers to the current player =\
Fix the problem.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #12  
Old 10-27-2005, 02:23 AM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
WAA i don't know what else to do, have it trigger serverside? That wouldn't work kfor some commands...unless i have it trigger serverside, then clientside? eh? maybe can't think of much else right now, if this won't work, what else would?
currently using (doesn't work at all)

NPC Code:
if(actionserverside){
if(strequals(#p(0),call)){
for(p=0;p<allplayerscount;p++){
with (getplayer(p)){
setstring serverr.eventsmessage,#T(#e(8,-1,#c)) Say /warp to warp to this event!;
triggeraction 0,0,clientside,-eventsmessage,eventsmessage;
//just trying stuff
}
}
}
}
//#CLIENTSIDE
if(weaponfired){
say2 Say /message <message>#b
to send a message to all players#b
ex: /message Holding Event...Spar!#b
}
if(isweapon&&playerchats&&startswith(/message,#c)){
triggeraction 0,0,serverside,Events Team/Message,call;
triggeraction 0,0,clientside,-eventsmessage,eventsmessage;
//again, trying stuff x_X
}


Last edited by excaliber7388; 10-27-2005 at 03:59 AM..
Reply With Quote
  #13  
Old 10-27-2005, 09:42 PM
excaliber7388 excaliber7388 is offline
Banned
excaliber7388's Avatar
Join Date: Jul 2005
Location: US
Posts: 5,229
excaliber7388 can only hope to improve
Send a message via AIM to excaliber7388
^ ^ ^
didn't work, I cant figure this out X_X
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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:50 PM.


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