Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   triggeraction stuff (https://forums.graalonline.com/forums/showthread.php?t=47138)

ApeHex 08-14-2003 11:47 PM

triggeraction stuff
 
ok, im having some trouble with triggeraction
the following code is in an npc that is sent to the players weapons
NPC Code:

if (actionserverside){
// Damage taking.
if (strequals(#p(0),0)){
this.damPower=strtofloat(#p(1));
this.damType=strtofloat(#p(2));
this.finalPower=int(this.damPower+this.damType-this.playArmor);
this.curHP-=this.finalPower;
setcharprop #c,OUCH! #v(this.curHP)/#v(this.maxHP).;
}
}


the next code is in a seperate npc
NPC Code:

if (playerchats&&startswith(/hurt,#c)){
triggeraction playerx,playery,serverside,0,1,1;
}


it doesnt seem to work for me ;\
could someone give me the correct way to use triggeraction (if thats wrong)

TribulationStaff 08-14-2003 11:54 PM

That is not how actionserverside works.

first off, I am just going to assume you have the serverside bit serverside.

secondly it works like this

triggeraction 0,0,serverside,weaponname,params;

ApeHex 08-15-2003 12:02 AM

so serverside calling wont work offline right?
what if i used
NPC Code:

// NPC made by Josey Hunt
if (playerchats&&startswith(/hurt,#c)){
triggeraction playerx,playery,hurt,1,1;
}


and in the weapon use
NPC Code:

if (actionhurt){
this.damPower=strtofloat(#p(0));
this.damType=strtofloat(#p(1));
this.finalPower=int(this.damPower+this.damType-this.playArmor);
this.curHP-=this.finalPower;
setcharprop #c,OUCH! #v(this.curHP)/#v(this.maxHP).;
}



but it still doesnt work
;o
someone push me in the right direction

osrs 08-15-2003 01:10 AM

I don't think that will work offline.

TribulationStaff 08-15-2003 01:45 AM

Ape IMed me, and this was worked out.

osrs 08-15-2003 04:34 AM

Quote:

Originally posted by TribulationStaff
Ape IMed me, and this was worked out.
i mean,"actionserverside".


All times are GMT +2. The time now is 08:29 PM.

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