Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   triggeraction clientside,0,0,name,param; (https://forums.graalonline.com/forums/showthread.php?t=50899)

Jimmii 02-06-2004 03:31 PM

triggeraction clientside,0,0,name,param;
 
does this work? one of the people on my server said it doesn't, but ive seen references to it before

i need the truth

adam 02-06-2004 04:59 PM

It ought to. It's a new method.

It works in weapon npc's.

Loriel 02-06-2004 05:32 PM

It is triggeraction 0,0,clientside,... though, the action name comes after the coordinates.

WanDaMan 02-06-2004 05:41 PM

In other words, no it wouldn't :). Loriel's version is correct :)
Like:
if(actionserverside){
/*
do stuff
*/
}
//#CLIENTSIDE
if(created){
triggeraction 0,0,serverside,npcname,params;
}
Have fun :)!

R0bin 02-06-2004 06:12 PM

The actionclientside action only works for weapon npcs.

NPC Code:

Code of weapon: "Bank"
if (actionserverside) {
if (strequals(#p(0),deposit)) {
if (strtofloat(#s(clientr.money))>=strtofloat(#p(1)) {
setstring clientr.money,#v(strtofloat(#s(clientr.money))-strtofloat(#p(1)));
playerrupees+=strtofloat(#p(1));
triggeraction 0,0,clientside,Bank,done;
}
}
}
//#CLIENTSIDE
if (weaponfired) {
tokenize #c;
triggeraction 0,0,serverside,#t(0),#t(1);
}
if (actionclientside) {
if (strequals(#p(0),done)) {
showtext -1,playerx+1.5,playery-.5,,Arial,bc,Done!;
changeimgzoom -1,0.7;
}
}



dunno if that works, just did it in the reply box :\

WanDaMan 02-06-2004 10:39 PM

Quote:

Originally posted by R0bin
The actionclientside action only works for weapon npcs.

Ah, thanks. I wasn't aware of that :)

TB3 02-08-2004 07:18 PM

I'm not sure i havent used it yet so..
When you call actionclientside from a DB npc, it calls that action in all weapons right? Or can you only do it inside the serverside section of a weapon?

ZeLpH_MyStiK 02-08-2004 08:01 PM

I do believe its weapons only...and it looks like this:
NPC Code:

if (actionserverside) {
//stuff
triggeraction 0,0,clientside,WEAPONNAME,params;
//stuff
}
//#CLIENTSIDE
//stuff
if (actionclientside) {
//stuff
}


osrs 02-08-2004 08:16 PM

It works basically as serverside triggeractions, but sent to client. So trigger from serverside.


All times are GMT +2. The time now is 08:47 AM.

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