Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Tryb COOP
#11
Ok.Mam postawiony z plików dostępnych na stronie uruchamia się, nawet można dołączyć lecz gdy załaduje grę mam pustą mapę(brak jakichkolwiek npc czy stworów) oraz zamiast na początku gry respi mnie w zamku starego obozu Sad
Reply
#12
Kurde jest gdzieś w pomocy ta funkcja. hmm jak ona szła jakoś: enableNpc(true); ? kurde nie pamiętam @Sative
Reply
#13
(04.11.2017, 22:38)Son Goku Wrote: Kurde jest gdzieś w pomocy ta funkcja. hmm jak ona szła jakoś: enableNpc(true); ? kurde nie pamiętam @Sative

{
enableGameNpcs(true);
}

Gdzie ją dodać?
Reply
#14
w client_script/main.nut dodaj to:
addEvent("onInit", function()
{
enableGameNpcs(true);
});
Reply
#15
Tak ma to wyglądać ?

function onInit()
{
addEvent("onInit", function()
{
enableGameNpcs(true);
});


addMessage(0, 255, 0, "Witaj " + getName() + " Smile");

setWeaponSkill(WEAPON_1H, 100);
setWeaponSkill(WEAPON_2H, 100);
setWeaponSkill(WEAPON_BOW, 100);
setWeaponSkill(WEAPON_CBOW, 100);

setMaxHealth(1000);
completeHeal();

setStrength(150);

setPosition(0, 250, 0);
equipMeleeWeapon("ITMW_1H_SWORD_05");
equipArmor("GRD_ARMOR_I");

function onRespawn()
{
completeHeal();
setPosition(0.0, 250.0, 0.0);
}

function onCommand(command, params)
{
switch (command)
{
case "walk_style1":
setOverlay("HumanS_Arrogance.mds");
break;

case "walk_style2":
setOverlay("Humans_Mage.mds");
break;

case "change_vis":
setAdditionalVisual("hum_body_Naked0", 3, "Hum_Head_Pony", 20);
sendVisual();
break;
}
}
Reply
#16
Nie xd, skoro w masz w main.nut funkcję przykładową "onInit" to wysarczy że zrobisz to tak:
function onInit()
{
enableGameNpcs(true);
}
addMessage(0, 255, 0, "Witaj " + getName() + " Smile");

setWeaponSkill(WEAPON_1H, 100);
setWeaponSkill(WEAPON_2H, 100);
setWeaponSkill(WEAPON_BOW, 100);
setWeaponSkill(WEAPON_CBOW, 100);

setMaxHealth(1000);
completeHeal();

setStrength(150);

setPosition(0, 250, 0);
equipMeleeWeapon("ITMW_1H_SWORD_05");
equipArmor("GRD_ARMOR_I");

function onRespawn()
{
completeHeal();
setPosition(0.0, 250.0, 0.0);
}

function onCommand(command, params)
{
switch (command)
{
case "walk_style1":
setOverlay("HumanS_Arrogance.mds");
break;

case "walk_style2":
setOverlay("Humans_Mage.mds");
break;

case "change_vis":
setAdditionalVisual("hum_body_Naked0", 3, "Hum_Head_Pony", 20);
sendVisual();
break;
}
}
Reply
#17
Wyrzuca mi błąd:
-== Gothic Online Server 0.4.6a ==-
[info] Config file found
[config] Server name: Mazi serwer
[config] Server port: 28970
[config] Max slots: 4
[config] Client script: main.nut
[config] Server script:
[info] Loading scripts...
[Squirrel] Cannot load scripts. File '' not found.
[info] Starting network...
[info] Listening for connections on 192.168.1.191:28970...
Reply
#18
pokaż zawartość pliku xml
Reply
#19
<!-- Gothic Online automatic generated config file -->
<GO_Config>
<world name="NEWWORLD\\NEWWORLD" />
<public>0</public>
<serverName>Mazi serwer</serverName>
<serverPort>28970</serverPort>
<maxSlots>4</maxSlots>
<adminPassword>office07</adminPassword>
<clientScript>main.nut</clientScript>
</GO_Config>
Reply
#20
Kurwa wtedy paser był o wiele inny, pokaż cały main.nut z folderu client_side
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Gothic Coop (Potwory) Matnow24 5 5,780 21.04.2018, 22:13
Last Post: Profesores
  Zamiast MP włącza się tryb single player. Dracon 11 7,909 05.05.2016, 13:49
Last Post: Dracon
  Dodanie NPC do G2O COOP. Trevor 3 3,485 24.03.2016, 17:44
Last Post: Vesemir

Forum Jump:


Users browsing this thread: 1 Guest(s)