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 02-05-2004, 12:49 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
triggeraction question

I was wondering if you could do this.

NPC Code:

with (getplayer(account)){
triggeraction 0,0,server/clientside,weaponname,params;
}



This could be used for maybe triggering someone elses weapon. Thanks for your input.
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.

Last edited by Duwul; 02-05-2004 at 01:02 AM..
Reply With Quote
  #2  
Old 02-05-2004, 01:28 AM
Riot Riot is offline
Delteria Management
Join Date: Nov 2003
Location: Seminole County, Florida
Posts: 280
Riot is on a distinguished road
Re: triggeraction question

Quote:
Originally posted by Duwul
I was wondering if you could do this.

NPC Code:

with (getplayer(account)){
triggeraction 0,0,server/clientside,weaponname,params;
}



This could be used for maybe triggering someone elses weapon. Thanks for your input.
Im pretty sure you can do that, with clientside atleast.
Reply With Quote
  #3  
Old 02-05-2004, 02:11 AM
Termina_Owner Termina_Owner is offline
Registered User
Join Date: Oct 2003
Posts: 175
Termina_Owner is on a distinguished road
NPCW:

NPC Code:

if (serverside){
if (strequals(#p(0),a)){
with (getplayer(#p(1))){
setstring client.a,1;
}
}
if (strequals(#p(0),b)){
setplayerprop #c,Arg... How can you do this to me?!;
}
}
//#CLIENTSIDE
if (playerenters) timeout = 0.05;
if (timeout){
if (!strequals(#s(client.a),)){
setstring client.a,;
triggeraction 0,0,serverside,NPCW,b;
}
}
if (weaponfired){
triggeraction 0,0,serverside,NPCW,a,#a;
}



A short example... I don't know if you can do that to someone else, but well, this is a detour if you can't.
__________________
- Rance Vicious
Reply With Quote
  #4  
Old 02-05-2004, 02:21 AM
xManiamaNx xManiamaNx is offline
Supreme Dictator
xManiamaNx's Avatar
Join Date: Nov 2002
Location: 127.0.0.1
Posts: 385
xManiamaNx is on a distinguished road
Send a message via MSN to xManiamaNx Send a message via Yahoo to xManiamaNx
if (serverside){

needs to be

if (actionserverside){
__________________
Maniaman

Play Maloria Now: [2.3] [3]
Maloria Website

Reply With Quote
  #5  
Old 02-05-2004, 02:22 AM
ZeLpH_MyStiK ZeLpH_MyStiK is offline
Scripter
ZeLpH_MyStiK's Avatar
Join Date: May 2003
Location: NYC
Posts: 553
ZeLpH_MyStiK is on a distinguished road
Send a message via MSN to ZeLpH_MyStiK Send a message via Yahoo to ZeLpH_MyStiK
Quote:
Originally posted by Termina_Owner
NPCW:

NPC Code:

if (serverside){
if (strequals(#p(0),a)){
with (getplayer(#p(1))){
setstring client.a,1;
}
}
if (strequals(#p(0),b)){
setplayerprop #c,Arg... How can you do this to me?!;
}
}
//#CLIENTSIDE
if (playerenters) timeout = 0.05;
if (timeout){
if (!strequals(#s(client.a),)){
setstring client.a,;
triggeraction 0,0,serverside,NPCW,b;
}
}
if (weaponfired){
triggeraction 0,0,serverside,NPCW,a,#a;
}



A short example... I don't know if you can do that to someone else, but well, this is a detour if you can't.
should be if (actionserverside) and also you can use callnpcs or do a triggeraction and add in the acct as a param and check if the person has that account.
__________________
Reply With Quote
  #6  
Old 02-05-2004, 02:28 AM
Termina_Owner Termina_Owner is offline
Registered User
Join Date: Oct 2003
Posts: 175
Termina_Owner is on a distinguished road
Meh... That's one of my common mistakes... When I script rapidly only to get an overview idea, I tend to forget the action... Ohwell... 'Jira would've known my mistake. I don't take him for a fool.
__________________
- Rance Vicious
Reply With Quote
  #7  
Old 02-05-2004, 05:19 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
Quote:
Originally posted by Termina_Owner
Meh... That's one of my common mistakes... When I script rapidly only to get an overview idea, I tend to forget the action... Ohwell... 'Jira would've known my mistake. I don't take him for a fool.
Haha! =P
I knew about setting a string. I was just thinking maybe this could be a way around using it.
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #8  
Old 02-05-2004, 07:17 AM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Only way to know is to try.

Only way to try is to get a job on a server. Or buy your own.
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #9  
Old 02-05-2004, 08:31 AM
Alexander Alexander is offline
Registered User
Join Date: Apr 2003
Location: California
Posts: 246
Alexander is on a distinguished road
Send a message via AIM to Alexander
Re: triggeraction question

Quote:
Originally posted by Duwul
I was wondering if you could do this.

NPC Code:

with (getplayer(account)){
triggeraction 0,0,server/clientside,weaponname,params;
}



This could be used for maybe triggering someone elses weapon. Thanks for your input.
It works I use it sometimes, triggering clientside, I don't believe serverside would work never tried.

Quote:
Originally posted by Termina_Owner
stuff
That script doesn't go outside the player and the with(getplayer(#p(1))) is unneeded.
Your script is basicly:
NPC Code:

//#CLIENTSIDE
if (weaponfired) setplayerprop #c,Arg... How can you do this to me?!;

Reply With Quote
  #10  
Old 02-05-2004, 09:48 AM
Termina_Owner Termina_Owner is offline
Registered User
Join Date: Oct 2003
Posts: 175
Termina_Owner is on a distinguished road
Quote:
That script doesn't go outside the player and the with(getplayer(#p(1))) is unneeded.
It was technically demonstrating. I know it didn't go out, but seeing I was writing the script up for 'Jira here, I knew he'd understand the point in which I was trying to demonstrate.

Just replace the #a by the account name you wanted. It's much simpler as to demonstrate then to find the index of the player in so-so place from you.

It's a technical script, however it's not a practical one. It's main purpose was to show a point of view in which 'Jira understood, knowing fully that there was unneeded substance, in which was needed to show my point.

I don't like doing full programs just to show a point in which the full program would be much more complex to the intended reader, making him have a much harder time learning from a technical script then from the practical one I could've made.

I have reason for why I do things, if you want me to explain every line by line (Right 'jira? I know you LOVE that!), then IM me on AIM and I'll be glad to tell you why each line was used.

I'm out.
__________________
- Rance Vicious
Reply With Quote
  #11  
Old 02-05-2004, 09:52 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 Termina_Owner


It was technically demonstrating. I know it didn't go out, but seeing I was writing the script up for 'Jira here, I knew he'd understand the point in which I was trying to demonstrate.

Just replace the #a by the account name you wanted. It's much simpler as to demonstrate then to find the index of the player in so-so place from you.

It's a technical script, however it's not a practical one. It's main purpose was to show a point of view in which 'Jira understood, knowing fully that there was unneeded substance, in which was needed to show my point.

I don't like doing full programs just to show a point in which the full program would be much more complex to the intended reader, making him have a much harder time learning from a technical script then from the practical one I could've made.

I have reason for why I do things, if you want me to explain every line by line (Right 'jira? I know you LOVE that!), then IM me on AIM and I'll be glad to tell you why each line was used.

I'm out.
Ajira is actually good at scripting, don't think he needs suck help.
__________________
"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
  #12  
Old 02-05-2004, 10:12 AM
Termina_Owner Termina_Owner is offline
Registered User
Join Date: Oct 2003
Posts: 175
Termina_Owner is on a distinguished road
Quote:
Originally posted by osrs


Ajira is actually good at scripting, don't think he needs suck help.
Reread => I said that Ajira is a good enough scripter to know what I meant.

As for the line by line, it's an inside joke, I'd guess... I told him every line of a whole post on aim just to piss him off... He knows what I meant, and that's all there is to it.
__________________
- Rance Vicious
Reply With Quote
  #13  
Old 02-05-2004, 03:33 PM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
Rofl.

First, osrs, Rance is my friend. =P
He's also better at scripting than me.

And yes, the line by line is VERY annoying..meh..

And Rogue, I do work on a server.

And thanks everyone for your input.
I guess I'll try it and see if it works.
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
Reply With Quote
  #14  
Old 02-05-2004, 08:23 PM
adam adam is offline
http://wiki.graal.us/
adam's Avatar
Join Date: Nov 2001
Posts: 2,247
adam has a spectacular aura aboutadam has a spectacular aura about
Send a message via AIM to adam
Im not a friend?
__________________
Rogue Shadow (TCN)(NAT)(Global Development Team)

For development help, contact the patrons of the #graaldt irc channel below, I am usually there.
Click Here to Join IRC Chat Now! -- irc.freenode.net Channel: #graaldt
Quote:
<Dustyshouri> no, RogueShadow is always talking about scripts lol
<Dustyshouri> in fact, he pretty much brought Graal back as a topic single-handedly
Reply With Quote
  #15  
Old 02-06-2004, 01:20 AM
Duwul Duwul is offline
Registered User
Join Date: Nov 2003
Posts: 105
Duwul is on a distinguished road
Quote:
Originally posted by adam
Im not a friend?
Of course you are. <333
__________________
-Ajira
Liek, omigosh.
<3 DoomsDay.
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 11:17 PM.


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