Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Donations Chest (https://forums.graalonline.com/forums/showthread.php?t=28062)

Geovanie Legend 04-26-2002 02:20 PM

Donations Chest
 
Ok it's been a while since i've scripted, someone care to help me here.. i need <KAIH4X0RED>
Thanks to those who are willing to help in advance. :)

Geovanie Legend 04-26-2002 02:31 PM

Ugh, ok well let's try this, if someone can script rather well please pm me. thanks

Saga2001 04-26-2002 02:45 PM

Oh no Geo! you can't do that either, cause no good scripters will. Anyway its better to learn how to rather then to get a script, right?

Geovanie Legend 04-26-2002 02:46 PM

True i suppose, i just hate having to learn how to script all over again, lol

emortylone 04-26-2002 08:19 PM

Here's a hint, if you're going to make it accessible after the player leaves, it should use a server tag...
---Shifter

emortylone 04-26-2002 08:42 PM

o_O? heh, my bad then. I only do non-p2p scripting :( Did not realize this. ne thing else you would care to enlighten me upon that is only for non-p2p??
---Shifter

emortylone 04-26-2002 08:54 PM

Explain l8er? I was told @ first that triggeraction was a p2p thing, so i didn't bother to learn it. Then i found out and shot the guy, lol, j/k.
---Shifter

Geovanie Legend 04-27-2002 02:15 AM

No big deal guys I have the donations chest so this thread is pointless now. :D

BBflat 05-05-2002 11:16 PM

Quote:

Originally posted by Geovanie Legend
No big deal guys I have the donations chest so this thread is pointless now. :D
Pointless, eh? Not any more.
Quote:

quote:
--------------------------------------------------------------------------------
Originally posted by emortylone
Here's a hint, if you're going to make it accessible after the player leaves, it should use a server tag...
---Shifter
--------------------------------------------------------------------------------



Only if it's non-P2P. You should be careful about giving advice without querying the setting.
Okay, so you don't have to declare a server string if the server is P2P? Can you set a variable (not a server.*) that will keep its value when everyone leaves and enters?

BBflat 05-06-2002 12:40 AM

Quote:

Originally posted by Kaimetsu


Sure, you can set a this.variable that stays with the NPC.

What if you take the NPC to another level? =0

BBflat 05-06-2002 12:59 AM

Quote:

Originally posted by Kaimetsu


If the NPC were moved somehow then it would still retain its values.

Okay, what about these situations?

1. A person is holding the NPC when all of a sudden he gets disconnected.

2. The weapon is in a person's weapon list, and he logs off/on.

3. The weapon is in a person's weapon list, and he travels to a new level.

BBflat 05-06-2002 02:44 AM

Quote:

Originally posted by Kaimetsu


When did we start talking about weapons?

05-05-2002 06:59 PM
Weapons are NPCs, too!

BBflat 05-06-2002 06:49 AM

Quote:

Originally posted by Kaimetsu


Not serverside NPCs.

Of course not. So let me get this straight...

NPC Code:

if (playerenters)
{
canbecarried;
}
if (playertouchsme)
{
this.a = 314159;
}



Okay, so if you pick up the NPC and carry it to the next level, assuming that you touched the NPC in the process of picking it up, with the value of this.a in the other level still be 314159?

BBflat 05-06-2002 07:44 AM

Quote:

Originally posted by Kaimetsu
I don't think serverside NPCs can be carried. But they fall into two categories:

1) Local NPCs, which can't leave the level.
2) Database NPCs, which can.

Both have their this. variables stored no matter what happens to them (within reason).

Got it. Much thanks.

Quote:

Originally posted by Geovanie Legend

No big deal guys I have the donations chest so this thread is pointless now.



All times are GMT +2. The time now is 11:48 PM.

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