Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   runic npc... i need help (https://forums.graalonline.com/forums/showthread.php?t=14722)

greeno 10-16-2001 06:51 AM

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!

SagaTCN 10-16-2001 06:53 AM

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

greeno 10-16-2001 06:55 AM

ok thanks, is that all?

greeno 10-16-2001 06:57 AM

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... :confused:

greeno 10-16-2001 07:01 AM

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++;
}

joseyisleet 10-16-2001 07:03 AM

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 ;)

Python523 10-16-2001 07:19 AM

WAY too much stuff in it, you could make it into 1 simple command:
replaceani hurt,runic;

greeno 10-16-2001 07:23 AM

r u sure, i mean im getting somewhere right now...

greeno 10-16-2001 07:37 AM

it doesnt work!!:(

btedji 10-16-2001 07:39 AM

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!!!!!!!!

BocoC 10-16-2001 07:55 AM

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;

Python523 10-16-2001 08:27 AM

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

greeno 10-16-2001 08:45 AM

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?

btedji 10-16-2001 08:47 AM

is that allowed on non-p2p??

dragoonvenganc 10-16-2001 11:26 AM

yes only p2p can use replace gani..

Python523 10-17-2001 07:17 AM

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)

greeno 10-17-2001 08:16 AM

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?

dragoonvenganc 10-17-2001 09:07 PM

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..

greeno 10-18-2001 04:35 AM

its fine so far, i just need to stop the flashing, and be able to be hurt by swords

btedji 10-20-2001 12:40 AM

if(anihurt){setani newhurt}

something like that will work??

Xaviar 10-20-2001 01:01 AM

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?

btedji 10-20-2001 01:05 AM

if(strequals(#m,hurt)){setani runic,;}

something like that

greeno 10-20-2001 03:51 AM

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

btedji 10-20-2001 04:22 AM

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

joseyisleet 10-20-2001 05:16 AM

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;
}

Python523 10-20-2001 05:41 AM

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

Xaviar 10-20-2001 05:59 AM

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.

btedji 10-20-2001 08:39 AM

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!!!

Xaviar 10-20-2001 08:33 PM

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?


All times are GMT +2. The time now is 10:47 PM.

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