Graal Forums  

Go Back   Graal Forums > Development Forums > NPC Scripting
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 12-29-2005, 03:50 AM
Wormx2 Wormx2 is offline
Banned
Wormx2's Avatar
Join Date: Aug 2005
Posts: 69
Wormx2 is on a distinguished road
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.
Reply With Quote
  #2  
Old 12-29-2005, 03:56 AM
CidNight1142 CidNight1142 is offline
I Fight Bears
CidNight1142's Avatar
Join Date: Oct 2005
Location: CT, USA
Posts: 2,197
CidNight1142 is on a distinguished road
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).
__________________
Cid Night
Retired GK Staff
Golden Pluffy Winner in Poetry
A poet never takes notes. You never take notes in a love affair.
Robert Frost
Reply With Quote
  #3  
Old 12-29-2005, 09:23 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
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.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #4  
Old 12-29-2005, 10:16 AM
Rick Rick is offline
PipBoy Extraordinaire!
Rick's Avatar
Join Date: Jul 2004
Location: Long Beach, California.
Posts: 831
Rick is on a distinguished road
/stats

Is something heinieraping your NPC server?
Reply With Quote
  #5  
Old 12-30-2005, 01:53 AM
Wormx2 Wormx2 is offline
Banned
Wormx2's Avatar
Join Date: Aug 2005
Posts: 69
Wormx2 is on a distinguished road
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





[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]

Last edited by Wormx2; 12-30-2005 at 02:08 AM..
Reply With Quote
  #6  
Old 12-30-2005, 01:59 AM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
PHP Code:
setlevel2(utility.graal,30,30); 
->
PHP Code:
player.setlevel2("utility.graal"3030); 
Apart from that, see here and here.
__________________
Skyld
Reply With Quote
  #7  
Old 12-30-2005, 02:02 AM
Yen Yen is offline
Banned
Yen's Avatar
Join Date: Oct 2005
Location: Nova Scotia, Canada
Posts: 1,085
Yen is an unknown quantity at this point
Send a message via AIM to Yen Send a message via MSN to Yen
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.
Reply With Quote
  #8  
Old 12-30-2005, 10:54 AM
ApothiX ApothiX is offline
Okiesmokie
Join Date: May 2004
Posts: 1,447
ApothiX is on a distinguished road
toweapons became deprecated when the NPC-Server was put in place. You should use 'player.addweapon(str)' serverside instead.
__________________


[06:24:19] * Parts: Skyld (i=silent@unaffiliated/skyld) ("Perhaps Okiesmokie did not realise that I like the boys. ")
Reply With Quote
  #9  
Old 12-30-2005, 07:32 PM
Wormx2 Wormx2 is offline
Banned
Wormx2's Avatar
Join Date: Aug 2005
Posts: 69
Wormx2 is on a distinguished road
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>;} 
?
Reply With Quote
  #10  
Old 12-30-2005, 08:47 PM
Lance Lance is offline
dark overlord
Lance's Avatar
Join Date: Sep 2003
Location: Space Jam Mountain
Posts: 5,072
Lance is on a distinguished road
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.
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 05:44 AM.


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