Graal Forums

Graal Forums (https://forums.graalonline.com/forums/index.php)
-   NPC Scripting (https://forums.graalonline.com/forums/forumdisplay.php?f=8)
-   -   Trouble with NPCs working on Doomsday (https://forums.graalonline.com/forums/showthread.php?t=63057)

Wormx2 12-29-2005 03:50 AM

Trouble with NPCs working on Doomsday
 
Recently, we had GS2 enabled on Doomsday. This was supposed to be a good thing so that the server could work.

Then I actually put scripts up. Now the scripts don't work. There is no errors on the editor, and none that show up on RC. They just don't work. Nothing works.

I know GS2 is enabled because an echo script does work - very laggly - but it does work. I have tested NPCs on Cid, and they don't work for him, and he's on a Mac and a PC.

I'm really having trouble figuring out what is wrong. If someone could help me out in figuring out the problem, it would be most grateful. Once these scripts work, DD is 75% done.

CidNight1142 12-29-2005 03:56 AM

I'll back this up. I was helping test some things, it seems all the scripts that related to gs2 are not working. Macs and PCs alike (whether or not that would make a difference).

ApothiX 12-29-2005 09:23 AM

Perhaps you could post portions of the scripts that do not work? It's pretty hard to give you an answer as to why it's not working, if we have no clue what kind of tomfoolery you have in your NPCs. ;)

Rick 12-29-2005 10:16 AM

/stats

Is something heinieraping your NPC server?

Wormx2 12-30-2005 01:53 AM

Here is an example of a script that doesn't work. Ajira gave it too me:

NPC Code:
function onPlayerChats() {
if (player.chat == "skip quests")
setlevel2(utility.graal,30,30);
}



This doesn't work.

NPC Code:
if (playertouchsme){toweapons Tailor;} (followed by all the scripts) 


This doesn't work.

Heres the stats:

NPC Code:
NPC-Server statistics:
Server uptime: 173 hrs 44 mins
Sleeptime (secs/min): 59378
Scriptime (last min): 60000
Connectiontries (last min): 1
NCs-in (byte/last min): 0
NCs-out (byte/last min): 0
GServer-in (byte/l.m.): 96
GServer-out (byte/l.m.): 0
Levels: 330
Active Levels: 7
NPCs: 284
Active NPCs: 4
DB-NPCs: 256
NPC-Placeholder: 65
Projectiles: 0
Players: 1
NC count: 1
GServers: 1
Top 20 of npcs taken most CPU time:
1. 0.444483334 % npcs[3] (in level ddoverworldd-9.nw at pos (5.9, 15.3))
2. 0.002275 % npcs[1] (in level dd_policestaff.nw at pos (30.5, 33))
3. 0.002026666 % npcs[8] (in level dd_policestaff.nw at pos (30.5, 33))
4. 0.002016666 % npcs[3] (in level dd_policestaff.nw at pos (45.5, 31.5))
GServer statistics:
Server uptime: 173 hrs 46 mins
Sleeptime (secs/min): 59908
Connectiontries (last min): 1
Players-in (byte/l.m.): 0
Players-out (byte/l.m.): 0
RCs-in (byte/last min): 5
RCs-out (byte/last min): 731
NPCServer-in (byte/l.m.): 0
NPCServer-out (byte/l.m.): 96
ServerList-in (byte/l.m.): 0
ServerList-out (byte/l.m.): 118
Player-avrg-in (bit/sec): 375
Player-avrg-out (bit/sec): 588
Levels: 0
NPCs: 0
Players: 0
RCs: 1
NPCServers: 1



:confused:

[edit]Ok, I can work with the quotes. I can also blame Ajira.

If toweapons doesn't work at all, what should it be replaced with?[/edit]

Skyld 12-30-2005 01:59 AM

PHP Code:

setlevel2(utility.graal,30,30); 

->
PHP Code:

player.setlevel2("utility.graal"3030); 

Apart from that, see here and here.

Yen 12-30-2005 02:02 AM

Quote:

Originally Posted by Wormx2
function onPlayerChats() {
if (player.chat == "skip quests")
setlevel2(utility.graal,30,30);
}

Is there a //#CLIENTSIDE above this? It should work, unless there is. Also, put " " around the level name.

toweapons needs to be removed from everything. You can't use it at all.

EDIT: Okay, %? When did this change take place and why wasn't I notified? :[
Ignore what I editted out.

ApothiX 12-30-2005 10:54 AM

toweapons became deprecated when the NPC-Server was put in place. You should use 'player.addweapon(str)' serverside instead.

Wormx2 12-30-2005 07:32 PM

Quote:

Originally Posted by ApothiX
toweapons became deprecated when the NPC-Server was put in place. You should use 'player.addweapon(str)' serverside instead.

I'm confused on how to work 'player.addweapon(str)' as this is a strange script to me.


Is it the same as the chat, or differen't? Like:

PHP Code:

function onPlayer<touchstouchme?>() {player.addweapon(str) <name here>;} 

?

Lance 12-30-2005 08:47 PM

Quote:

Originally Posted by Wormx2
I'm confused on how to work 'player.addweapon(str)' as this is a strange script to me.


Is it the same as the chat, or differen't? Like:

PHP Code:

function onPlayer<touchstouchme?>() {player.addweapon(str) <name here>;} 

?

'str' in a command means string. In this case, it is the name of the weapon you are trying to add. Make sure to enclose strings with quotation marks.


All times are GMT +2. The time now is 08:01 AM.

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