Gothic Online Forums
[G2O v.0.1.2][Server-Side] NPC Manager - Printable Version

+- Gothic Online Forums (https://archive.gothic-online.com)
+-- Forum: Scripting (English) (https://archive.gothic-online.com/forum-11.html)
+--- Forum: Resources (https://archive.gothic-online.com/forum-14.html)
+---- Forum: Scripts (https://archive.gothic-online.com/forum-17.html)
+---- Thread: [G2O v.0.1.2][Server-Side] NPC Manager (/thread-2218.html)

Pages: 1 2


RE: [G2O v.0.1.2][Server-Side] NPC Manager - Yzibz - 18.11.2017

I got a little problem here ^^
The bot is connected but he isnt there and i got these errors.


Code:
[2017-11-18 04:12:10] [squirrel] Error runtime: 'default/server-scripts/packets.nut' (Ln: 8): class instances do not support the new slot operator
[2017-11-18 04:12:10] -== Stack Dump: ==-
[2017-11-18 04:12:10] 1: Function: 'synchronizateNPCOnStart' File: 'gamemodes/server-scripts/inc/npcSynchronizate.nut' Line: 7
[2017-11-18 04:12:10] 2: Function: 'onPlayerConnect' File: 'gamemodes/server-scripts/inc/npcSynchronizate.nut' Line: 59
[2017-11-18 04:12:10]
-== Local varaiable: ==-
[2017-11-18 04:12:10] + array: vargv
[2017-11-18 04:12:10] + string: funcName (addNPC)
[2017-11-18 04:12:10] + integer: pid (0)
[2017-11-18 04:12:10] + instance: this
[2017-11-18 04:12:10] + integer: pid (0)
[2017-11-18 04:12:10] + instance: this
[2017-11-18 04:12:10] + instance: k
[2017-11-18 04:12:10] + integer: v (0)
[2017-11-18 04:12:10] + integer: pid (0)
[2017-11-18 04:12:10] + table: this
[2017-11-18 04:12:28] [squirrel] Error runtime: 'default/server-scripts/packets.nut' (Ln: 8): class instances do not support the new slot operator
[2017-11-18 04:12:28] -== Stack Dump: ==-
[2017-11-18 04:12:28] 1: Function: 'synchronizateNPC' File: 'gamemodes/server-scripts/inc/npcSynchronizate.nut' Line: 42
[2017-11-18 04:12:28] 2: Function: 'unknown_function' File: 'gamemodes/server-scripts/inc/npcSynchronizate.nut' Line: 72
[2017-11-18 04:12:28]

push?Sad


RE: [G2O v.0.1.2][Server-Side] NPC Manager - Bimboluch - 04.12.2017

Swoją drogą, czy jest jakaś opcja żeby po zabiciu danego NPC postać otrzymywała określoną ilość doświadczenia, bo przeszukałem forum wzłuż i wszerz i nic,


RE: [G2O v.0.1.2][Server-Side] NPC Manager - Jarosllav Degtyariev - 04.12.2017

Use something like that:

Code:
local botid;

addEventHandler("onPlayerKillNPC", function(kid, bid, ai){
 if(bid == botid){
   setExp(getExp() + 50); //Or other value
 }
});



RE: [G2O v.0.1.2][Server-Side] NPC Manager - Quarchodron - 08.12.2017

Yzibz there is a problem with file packet.nut. Default its like packet <- Packet();. Change it to local packet = Packet();. delete packet; to packet = null;. packet.nut in client and server side. Tomorrow i will add some package repair some thinks and add eating.


RE: [G2O v.0.1.2][Server-Side] NPC Manager - Mattwell - 21.01.2018

Quarchodron, can you update your script to 0.1.3 G2O Version? I have the following errors when I am trying to run this script right now:

[Image: 8GrVmAqZLDeRg.png]


RE: [G2O v.0.1.2][Server-Side] NPC Manager - Patrix - 21.01.2018

Functions callClientFunc and callServerFunc (which is using this script) are in default server files in folder "examples". You have to include two files called "packets.nut", one for client-side and one for server-side to your server files to eliminate this error.


RE: [G2O v.0.1.2][Server-Side] NPC Manager - Quarchodron - 21.01.2018

Matwwell i suggest to use this one : http://gothic-online.com.pl/forum/showthread.php?tid=2301
or this http://gothic-online.com.pl/forum/showthread.php?tid=2290
No really have time for this ;/