Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Closed Thread
 
Thread Tools Search this Thread Display Modes
  #1  
Old 02-14-2003, 06:35 AM
kenyonandelliot kenyonandelliot is offline
Registered User
Join Date: May 2002
Posts: 1,017
kenyonandelliot is on a distinguished road
Sword System

I need help on making a sword system similiar to Shaded Legends (If they still have it) and maybe Kingdoms to.
  #2  
Old 02-14-2003, 03:35 PM
kenyonandelliot kenyonandelliot is offline
Registered User
Join Date: May 2002
Posts: 1,017
kenyonandelliot is on a distinguished road
Quote:
Originally posted by Kaimetsu
What do you need to know?
Like how do you do the things to make the swords take away damage?
  #3  
Old 02-14-2003, 03:49 PM
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
To make the moviments etc..
usually use setani,replaceani.

and

Quote:
Originally posted by Kaimetsu
-_-

Trigger the NPC Server with a set of coordinates, have it check the position and then make it take away x health points from anything whose location matches.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
  #4  
Old 02-14-2003, 03:59 PM
kenyonandelliot kenyonandelliot is offline
Registered User
Join Date: May 2002
Posts: 1,017
kenyonandelliot is on a distinguished road
Quote:
Originally posted by Kaimetsu
-_-

Trigger the NPC Server with a set of coordinates, have it check the position and then make it take away x health points from anyone whose location matches.
Can you give me like an example of the sets and what you said?

Also thank you osrs to for help.
  #5  
Old 02-14-2003, 06:30 PM
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 found a good example at NewFeatures:

triggeraction targetx,targety,action,params;

This is one of the commands that give you like 50% more scripting
power than before. It is like a combination of hitobjects and
callnpc, but better. With 'triggeraction' you invoke an event
to the object on positon (targetx,targety). If the object is
an npc, then the npc script is called with the flag
'action<action>' set, when the object is a player then the
weapon scripts of the that player are called with the
'action<action>' flag set.
'params' can be one or more parameters, divided by commas;
the called script can read the paramters by accessing the
message code #p(paramindex).
Because this is hard to explain with words, here some little examples:

Quote:
- trigger player weapons
You can easily do a weapon which freezes the other
player:

if (playertouchsme) toweapons Freezing-Weapon;
if (weaponfired) {
triggeraction playerx+1.5+vecx(playerdir)*2,
playery+2+vecy(playerdir)*2,freeze,;
}
if (actionfreeze) {
freezeplayer 3;
setplayerprop #c,FREEZED;
}

Both players must have this weapon for making it
working. Then use it on the other player, and he will
be freezed, because a 'freeze' action is sent to him
and his weapon script, called with flag 'actionfreeze',
will freeze him. You can also move the if (actionfreeze) ...
into an system npc so the weapon can be used on all
players.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
  #6  
Old 02-14-2003, 11:12 PM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
I'll try to explain it as simple as possible

Ok, The actual sword part is really simple. Just a basic NPCW(weapon) that sends a triggeraction (I believe someone already posted what triggeraction is) that sends parameters to the NPC-Server. The parameters can (and should) be the X and Y where the sword hit is, also the player who swung the swords accountname, index, or ID would be a good thing. You can add other things for more options and such later.

After you do that you need some kind of System to handle the triggered actions serverside. This can be a NPCW also. It will recieve the actions and handle them appriopriatly. Such as finding out if a player is in the coordinates passed in the parameter. If there isn't then nothing will happen (unless, ofcourse, you want something to happen. Such as saying "MISSED!"), but if there is a player in the given coordinates then you can then cause damage to the player however you see fit.

I tried to make this simple, if you have questions just talk to me on AIM or through forum PM
__________________
new account: Trevor
  #7  
Old 02-15-2003, 04:09 AM
kenyonandelliot kenyonandelliot is offline
Registered User
Join Date: May 2002
Posts: 1,017
kenyonandelliot is on a distinguished road
Quote:
Originally posted by Kaimetsu


An example? Of coordinates? Okay, here's an example set of coords: (16,12). Want another? (30,9). But I think the problem here is not lack of clarity on my part, but rather lack of expertise on yours. You don't really have any idea what I'm talking about, do you?
Nope I don't understand since you use big words that I don't understand. Sorry about that.
  #8  
Old 02-15-2003, 04:12 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Quote:
Originally posted by kenyonandelliot


Nope I don't understand since you use big words that I don't understand. Sorry about that.
you don't know what coordinates are?? go back to school, maybe you can learn what 2+2 is -.-
  #9  
Old 02-15-2003, 04:16 AM
kenyonandelliot kenyonandelliot is offline
Registered User
Join Date: May 2002
Posts: 1,017
kenyonandelliot is on a distinguished road
2+2 is 4 stupid. I didn't get the clarity and stuff. Also I know what coordinates are.
  #10  
Old 02-15-2003, 04:22 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 Python523

you don't know what coordinates are?? go back to school, maybe you can learn what 2+2 is -.-
Lolz...

Quote:
Originally posted by kenyonandelliot
2+2 is 4 stupid. I didn't get the clarity and stuff. Also I know what coordinates are.
Dude..I,Kai and Trevor already explained..now try to script it.
__________________
"Ability is what you are capable of doing. Motivation determines what you do. Attitude determines how well you do it."
Facebook: facebook.com/raysilvadotnet /
  #11  
Old 02-15-2003, 04:33 AM
tlf288 tlf288 is offline
Registered User
tlf288's Avatar
Join Date: Nov 2001
Location: new account: Trevor
Posts: 0
tlf288 is on a distinguished road
Send a message via AIM to tlf288 Send a message via Yahoo to tlf288
Quote:
Originally posted by kenyonandelliot
I didn't get the clarity and stuff.
Sorry, I really am. I put it as simple as I knew how. If you can't understnad it then I must be one stuck up snob who can't talk in lamen terms. Sorry....
__________________
new account: Trevor
Closed Thread


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:47 AM.


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