Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Triggeraction Serverside (https://forums.graalonline.com/forums/showthread.php?t=46421)

Questa 07-23-2003 08:19 PM

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?! :confused:

CheeToS2 07-23-2003 09:13 PM

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.

Questa 07-23-2003 09:20 PM

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.

CheeToS2 07-23-2003 10:22 PM

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

Questa 07-24-2003 01:01 AM

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


All times are GMT +2. The time now is 09:33 AM.

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