![]() |
Adding Weapons to All Accounts?
:confused:
function onCreated() { addweapon weapon1; addweapon weapon2; //etc... } Would something like this work for if I wanted to add a set number of "weapon" scripts to all accounts when they first log on? Or is there a better, more efficient way of doing this? |
You're mixing a GS2 function definition with GS1 commands, please don't.
ActionPlayerOnline is called in the Control-NPC when a player logs in, you would do: PHP Code:
|
Okay, sounds good.. I'm going to try that.
EDIT: LOL! Uhh, that froze my whole Graal client, and when I looked on RC, the npcs have not been added. :( Perhaps I did something wrong? I swear I have that script word-for-word |
Weapon names would be case sensitive, also make sure the script is serverside in the Control-NPC.
It should not freeze your client unless something clientside in one of your weapon scripts is doing it. |
"Serverside in the control npc" = Huh?
I just grabbed a blank "W" npc form and input what you said to. but what do you mean by having it serverside in the control npc? |
-______________________________________-
Open the Database NPC's list and edit the script of the Control-NPC. The button for the Database NPC's is left of the weapons button in RC. |
I always add something like this to Control-NPC
PHP Code:
|
Quote:
Works like a dream ^_^ Thankya |
If it helps, I made an "advanced" NPC-Control script in the code gallery which uses files (like the login message) to control classes, weapons, etc.
Here's a link if you want it. http://forums.graalonline.com/forums...ad.php?t=77750 Might help your server get down some of the basics. |
Quote:
|
Quote:
|
| All times are GMT +2. The time now is 04:22 AM. |
Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.