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 07-23-2003, 08:19 PM
Questa Questa is offline
Back to the Beat
Join Date: Jan 2002
Location: USA
Posts: 1,230
Questa is on a distinguished road
Send a message via AIM to Questa
Unhappy Triggeraction Serverside

I'm trying to make a jailer, which is a pretty basic thing, but it just won't work. I've tried a lot of things to fix the triggeraction, but nothing helps! So that probably means it's a pretty stupid error on my part, but please take a look:

NPC Code:

if (actionserverside) {
if (strequals(#p(0),jail)) {
with (getplayer(#p(1))) {
setlevel2 jail.nw,30,30;
disableweapons;
}
addstring server.jailedlist,#p(1);
}
if (strequals(#p(0),unjail)) {
with (getplayer(#p(1))) {
setlevel2 wait.nw,30,30;
enableweapons;
}
removestring server.jailedlist,#p(1);
}
setplayerprop #c,Successfully #p(0)ed #p(1)!;
}
//#CLIENTSIDE
if(playerchats && startswith(jail,#c)){
tokenize #c;
if(tokenscount==2){
triggeraction 0,0,serverside,jail,#t(1);
}

}

if(playerchats && startswith(unjail,#c)){
tokenize #c;
if(tokenscount==2){
triggeraction 0,0,serverside,unjail,#t(1);
}

}




What's wrong here?!
__________________
Reply With Quote
  #2  
Old 07-23-2003, 09:13 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Is it a weapon?

Also, you might want to move those add/removestrings within the getplayer statement, otherwise it will add those strings regardless of whether or not the player is online.
__________________

Reply With Quote
  #3  
Old 07-23-2003, 09:20 PM
Questa Questa is offline
Back to the Beat
Join Date: Jan 2002
Location: USA
Posts: 1,230
Questa is on a distinguished road
Send a message via AIM to Questa
Quote:
Originally posted by CheeToS2
Is it a weapon?

Also, you might want to move those add/removestrings within the getplayer statement, otherwise it will add those strings regardless of whether or not the player is online.
Yes, it's a weapon in the database. Should have mentioned that.
__________________
Reply With Quote
  #4  
Old 07-23-2003, 10:22 PM
CheeToS2 CheeToS2 is offline
That Guy
CheeToS2's Avatar
Join Date: Dec 2001
Location: Seattle, WA
Posts: 2,528
CheeToS2 will become famous soon enough
Send a message via AIM to CheeToS2
Quote:
Originally posted by Questa

Yes, it's a weapon in the database. Should have mentioned that.
format for weapon triggeraction to itself is:

triggeraction 0,0,actionname,weaponname,params;

you're missing the weapon name ;o
__________________

Reply With Quote
  #5  
Old 07-24-2003, 01:01 AM
Questa Questa is offline
Back to the Beat
Join Date: Jan 2002
Location: USA
Posts: 1,230
Questa is on a distinguished road
Send a message via AIM to Questa
Quote:
Originally posted by CheeToS2


format for weapon triggeraction to itself is:

triggeraction 0,0,actionname,weaponname,params;

you're missing the weapon name ;o
Thanks, man I wish I would have read that somewhere x-x
__________________
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 04:55 PM.


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