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 08-14-2003, 11:47 PM
ApeHex ApeHex is offline
Registered User
Join Date: Jun 2003
Location: USA
Posts: 72
ApeHex is on a distinguished road
Send a message via AIM to ApeHex
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)
__________________
Reply With Quote
  #2  
Old 08-14-2003, 11:54 PM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
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;
__________________


Help me keep scripting
Reply With Quote
  #3  
Old 08-15-2003, 12:02 AM
ApeHex ApeHex is offline
Registered User
Join Date: Jun 2003
Location: USA
Posts: 72
ApeHex is on a distinguished road
Send a message via AIM to ApeHex
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
__________________
Reply With Quote
  #4  
Old 08-15-2003, 01:10 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
I don't think that will work offline.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
Reply With Quote
  #5  
Old 08-15-2003, 01:45 AM
TribulationStaff TribulationStaff is offline
Registered User
Join Date: Jul 2003
Location: Pennsylvania
Posts: 368
TribulationStaff is on a distinguished road
Send a message via AIM to TribulationStaff
Ape IMed me, and this was worked out.
__________________


Help me keep scripting
Reply With Quote
  #6  
Old 08-15-2003, 04:34 AM
osrs osrs is offline
Graalian since 1998
osrs's Avatar
Join Date: Mar 2002
Location: Brazil
Posts: 2,724
osrs is on a distinguished road
Send a message via ICQ to osrs Send a message via AIM to osrs Send a message via MSN to osrs Send a message via Yahoo to osrs
Quote:
Originally posted by TribulationStaff
Ape IMed me, and this was worked out.
i mean,"actionserverside".
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
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 03:31 AM.


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