Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   if player has? (https://forums.graalonline.com/forums/showthread.php?t=27790)

XeroMaster 04-20-2002 10:41 PM

if player has?
 
is there ANY way to make it so if the player(you) has hats # 109 there could be a timeout?

NPC Code:
if (playerstrequals #P1,hat109.png) 
{timeout=0.05;}


Spanko 04-20-2002 10:42 PM

Erm..
NPC Code:
if (created||timeout) {
if (strequals(#P1,hat109.png) {
stuffyouwantitdo;
}
timeout=.05;
}


Would work

SaijinGohan 04-22-2002 02:51 AM

thats if you are wearing it, to check if the player HAS it you need to check these two flags

client.hatc109>0

and

hatc109>0

SaijinGohan 04-23-2002 06:50 PM

which a lot of servers do try to do

Saga2001 04-23-2002 10:46 PM

Well who wouldn't, its an easy way. However I must admit writing new ones are a lot more fun... If you use the horrible 2k1 one, then you can save time. ;). Which I have opted to do on Andor, but who knows what I will do, or even who dares to dream?

SaijinGohan 04-24-2002 03:48 AM

yeah and it is so hard to make new hats.. u have to make a new graphic to put in the gani, then you have to edit the gani.. just use the dang down idle part of the hats as the plain img

Saga2001 04-24-2002 04:29 PM

Quote:

Originally posted by Kaimetsu


:confused:

The hats fit right into the gani. There's no need to edit it every time.

I think he is talking about how there is a gani that goes with it, although no one but 2k1 really uses that gani I don't think.

emortylone 04-25-2002 09:02 PM

I think a lot of people try and do stuff as complicated as they can. like bombscount[0].whatever and stuff. just do like bombscount-=10; i try and make my stuff as simple as possible, so whoever wants to edit it l8er has a better chance of understanding it. And many many people use strings like 10 million times per script. there are other ways of doing things!
---Shifter

XeroMaster 04-26-2002 03:38 AM

OK
 
I have so far
NPC Code:
if (strequals(#P1,hat109.png)) {timeout=0.05}



if there a way to end a timeout?

so i could else {timeout=NO MORE}

Kadar 04-26-2002 05:17 AM

Re: OK
 
Quote:

Originally posted by XeroMaster
I have so far
NPC Code:
if (strequals(#P1,hat109.png)) {timeout=0.05}



if there a way to end a timeout?

so i could else {timeout=NO MORE}

timeout = 0;

emortylone 04-26-2002 08:24 PM

put the timeout so that it loops as long as the hat is still active. Like:
if (strequals(#P1,hat109.png)) {timeout=0.05}
if (timeout&&strequals(#P1,hat109.png)) timeout=0.05;

that way it loops ONLY if the hat is still active. i'd add in just to be safe something so that if the hat is NOT active, timeout=0 just in case it glitches or something, who knows? heh.
---Shifter

emortylone 04-26-2002 08:41 PM

o_O? Howso, and how would you approach it?
---Shifter

emortylone 04-26-2002 08:53 PM

Ah, calling strings is not always the quickest then? I usually don't use tons and never realized this. *smacks himself in the head*. I promise, tomorrow i'll drink LOADS of Caffeine b/4 i come and post. i h8 school!
---Shifter

emortylone 04-26-2002 09:03 PM

strequals and such. or by using the strings. i didn't mean calling up as like store strings, my bad.
---Shifter

emortylone 04-26-2002 09:11 PM

Did you ever notice that Sans ftp is horrible? It screws up a lot and doesn't download images. I had to use putnpc ( *shivers* ) one time, and it worked fine, except online it would not put the npc, it would destroy the command (like i progged it too) but i would not put the npc, VERY annoying.
---Shifter

emortylone 04-29-2002 08:17 PM

Do you have a global RC? I get on there, and i am not sure what the problem is, but majority of the time the images and txt files are messed up! Like we uploaded orb.gif for my event warper, and it was VISIBLE in the FTP, but would not download. we did a /find orb.gif and it did not show. I have nota clue. Perhaps switching the location of the gifs will help, i'll look into it l8er. I am hoping that the new graal will fix it! Is a new version of RC coming out? One that doesn't LAG HORRIBLY!
---Shifter


All times are GMT +2. The time now is 11:41 AM.

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