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 10-16-2001, 06:51 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
Question runic npc... i need help

i cant figure this out, when i put
setani runic.gani;

i get this
Error: Expected format string,string

help me please, i know this will be helpful in a server!
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #2  
Old 10-16-2001, 06:53 AM
SagaTCN SagaTCN is offline
Registered User
Join Date: Aug 2001
Location: West Michigan
Posts: 190
SagaTCN is on a distinguished road
Send a message via ICQ to SagaTCN Send a message via AIM to SagaTCN Send a message via Yahoo to SagaTCN
I believe the second string is params. I doubt you'll need params, so simply use: setani gani_name,; (notice the comma before the semi-colon). -Yin
Reply With Quote
  #3  
Old 10-16-2001, 06:55 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
ok thanks, is that all?
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #4  
Old 10-16-2001, 06:57 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
Unhappy

now i need to know what it is called when you are hit by a bomb... and arrow,


and while your at it can you tell me why it doesnt play the gani?
it doesnt freezeplayer or play the gani, im confused here...
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #5  
Old 10-16-2001, 07:01 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
heres my whole npc so far... tell me if im wrong in doing this so far...
// NPC made by Stipo, Thief of -Thieves-
if (created) {
setimg yellowspellbook.gif;
}
if (runicbought) {
toweapons Runic;
}

if (weaponfired && peltwithbush){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithvase){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithstone){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithsign){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithnpc){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithblackstone){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && playershot){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && playerexploded){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #6  
Old 10-16-2001, 07:03 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
Look at the commands.rtf file it explains it quite easily.
setani ganiname,direction;

Do not use .gani at the end of the name, for single direction gani's use
setani ganiname,;
Gani's are one of the simplest things to set up
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #7  
Old 10-16-2001, 07:19 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
WAY too much stuff in it, you could make it into 1 simple command:
replaceani hurt,runic;
Reply With Quote
  #8  
Old 10-16-2001, 07:23 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
r u sure, i mean im getting somewhere right now...
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #9  
Old 10-16-2001, 07:37 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
it doesnt work!!
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #10  
Old 10-16-2001, 07:39 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by greeno
heres my whole npc so far... tell me if im wrong in doing this so far...
// NPC made by Stipo, Thief of -Thieves-
if (created) {
setimg yellowspellbook.gif;
}
if (runicbought) {
toweapons Runic;
}

if (weaponfired && peltwithbush){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithvase){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithstone){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithsign){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithnpc){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && peltwithblackstone){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && playershot){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
if (weaponfired && playerexploded){
setani runic.gani,;
freezeplayer 1;
playerhearts++;
}
*cries*

use || which means 'or' instead of all those commands!!!!!!!!
Reply With Quote
  #11  
Old 10-16-2001, 07:55 AM
BocoC BocoC is offline
Registered User
BocoC's Avatar
Join Date: Jun 2001
Location: Washington State, USA
Posts: 980
BocoC is on a distinguished road
Send a message via AIM to BocoC Send a message via Yahoo to BocoC
The problem is that you have to fire the weapon at the EXACT second you get hit. Just do something like this:

replaceani hurt,runic;
__________________
-Boco

FLKJH$TRFG*$(&%>FMG >REN<>F ;.kjsd
Reply With Quote
  #12  
Old 10-16-2001, 08:27 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 BocoC
The problem is that you have to fire the weapon at the EXACT second you get hit. Just do something like this:

replaceani hurt,runic;
He's Right, why don't you do something like
if (playerchats && strequals(#c,Buy Runic)) {set boughtrunic;}
if (boughtrunic) {replaceani hurt,runic;}
that should work fine
Reply With Quote
  #13  
Old 10-16-2001, 08:45 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
its starting to work, but when it plays the gani, it has like (_)b3r lag!! and it flashes like your being hurt.. how do u disable flashing and moving when being hurt?
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #14  
Old 10-16-2001, 08:47 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
is that allowed on non-p2p??
Reply With Quote
  #15  
Old 10-16-2001, 11:26 AM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
yes only p2p can use replace gani..
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #16  
Old 10-17-2001, 07:17 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 dragoonvenganc
yes only p2p can use replace gani..
O, I didn't know he was working on a server

Well, the best bet, if Stefan aloows it, would be to replace the hurt.gani (delete it and rename the runic.gani hurt.gani, it would probably work that way w/o any scripting at all)
Reply With Quote
  #17  
Old 10-17-2001, 08:16 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
no you dont understand my way of thinking, i dont want to change the gani all together, i want to make it so that you get this npc on a quest and you can avoid getting hurt by bombs arrows and throwing things, in other words your invincible except for swords but i just need it to stop flashing and laging now and ill be fine with it, any suggestions? anyone?
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #18  
Old 10-17-2001, 09:07 PM
dragoonvenganc dragoonvenganc is offline
Registered User
Join Date: Jul 2001
Location: USA
Posts: 331
dragoonvenganc is on a distinguished road
Send a message via ICQ to dragoonvenganc Send a message via AIM to dragoonvenganc
hum thinking..
and hey if u just delete it and rename ruinic thing then every body would have to do it or it would not work.

and when they go on other servers they would then have to get the original hurt.gani.

HEre is on way.
in the bows and stuff u could do i think that checks a flag invincible.
and if invinciable arrows do not hurt.

and i am not sure about bombs .. on npcs u could do if (exploded) then what ever if invinciable does not do any thing to them..

but on players i do not know..
__________________
Dragoon Vengance
Owner of Pangea Relics of Time
P2P Rp server
For info or job
Email: [email protected]
aim: dragoonvengnc
Reply With Quote
  #19  
Old 10-18-2001, 04:35 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
its fine so far, i just need to stop the flashing, and be able to be hurt by swords
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #20  
Old 10-20-2001, 12:40 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
if(anihurt){setani newhurt}

something like that will work??
Reply With Quote
  #21  
Old 10-20-2001, 01:01 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by btedji
if(anihurt){setani newhurt}

something like that will work??
if (washit) {
setani idle,; //or whatever its called, to lazy to check..
playerhearts=this.oldhearts; //and then somewhere else, maybe in a timeout, maybe in a weaponfired if thats what you want.
}

Maybe this is what you were thinking?
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #22  
Old 10-20-2001, 01:05 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
if(strequals(#m,hurt)){setani runic,;}

something like that
Reply With Quote
  #23  
Old 10-20-2001, 03:51 AM
greeno greeno is offline
Registered User
Join Date: Oct 2001
Location: U.S.A.
Posts: 116
greeno is on a distinguished road
Send a message via AIM to greeno
i dunno, they sound good but HOW DO YOU STOP FLASHING FOR IT, sorry if you feel offended by me yelling but thats the only problem
__________________
-Stipo Swift-
"My Cat likes string cheese"
Reply With Quote
  #24  
Old 10-20-2001, 04:22 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by greeno
i dunno, they sound good but HOW DO YOU STOP FLASHING FOR IT, sorry if you feel offended by me yelling but thats the only problem
i dont think there is a way to stop that
Reply With Quote
  #25  
Old 10-20-2001, 05:16 AM
joseyisleet joseyisleet is offline
Registered User
Join Date: Aug 2001
Posts: 378
joseyisleet is on a distinguished road
if (timeout){
if (strequals(#m,hurt){sleep .05;setani runic,playerdirection;
timeout =.05;
}
it's something like that, BUT that would replace it even if you're hit by a sword, so you should use your last code. Except put it in a time out and don't use if (weaponfired&&waspeltbybush){} or whatever. When it does that they'd have to use the NPC the exact moment that they would be getting hit. So use something like:
if (playerenters){toweapons Ijustwrotethisintheforums;
timeout=.05;
}
if (timeout&&isweapon&&waspeltbybush||waspeltbyvase){
blah blah blah;
timeout=.05;
}
__________________
Account used by Josey and Howard.
Ali G: 'Is it cause i Black?'
Reply With Quote
  #26  
Old 10-20-2001, 05:41 AM
Python523 Python523 is offline
Banned
Join Date: Aug 2001
Location: Illinois
Posts: 3,498
Python523 is on a distinguished road
Maybe you could do this, time how long the hurt gani is, say it is 3 seconds, do
if (whatever you have here) {sleep3; setani runic,;} you could do that
Reply With Quote
  #27  
Old 10-20-2001, 05:59 AM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by Python523
Maybe you could do this, time how long the hurt gani is, say it is 3 seconds, do
if (whatever you have here) {sleep3; setani runic,;} you could do that
No because then it just waits for you to finish being hurted (to coin a phrase..), then sets your ani...I hate to say this, cause I kinda don't like the guy (no offence =/), but joey was pretty much right, except you shouldnt need a timeout if I'm not mistaken.
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
Reply With Quote
  #28  
Old 10-20-2001, 08:39 AM
btedji btedji is offline
bryan986
btedji's Avatar
Join Date: Apr 2001
Location: Force 10
Posts: 1,153
btedji is on a distinguished road
Send a message via ICQ to btedji Send a message via AIM to btedji Send a message via Yahoo to btedji
Quote:
Originally posted by Python523
Maybe you could do this, time how long the hurt gani is, say it is 3 seconds, do
if (whatever you have here) {sleep3; setani runic,;} you could do that
you need to use pause after the setani or else it will pause the script before the ani is playing!!!
Reply With Quote
  #29  
Old 10-20-2001, 08:33 PM
Xaviar Xaviar is offline
Registered User
Join Date: Aug 2001
Location: Fairyland
Posts: 463
Xaviar is on a distinguished road
Send a message via ICQ to Xaviar Send a message via AIM to Xaviar
Quote:
Originally posted by btedji


you need to use pause after the setani or else it will pause the script before the ani is playing!!!
Didn't I just say that?
__________________
One by one, the penguins steal my sanity.

*cookie for Xaviar* --Originally posted by Tyhm

--Xaviar

A m e r i c a
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 01:41 AM.


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