Aller au contenu

Photo

in need of desperate help


  • Veuillez vous connecter pour répondre
17 réponses à ce sujet

#1
tribal15111

tribal15111
  • Members
  • 22 messages
ok so here is the deal i tried using the examples the wiki gave me to load a template creature onto my player so i can look like a warewolf but when i compile the script it 1. comes up with errors as do most the scripts on that particulare page and 2. i am still a genaric person i even tried messing around with the other chargen scrips i cant even get the name to change even though i clearly put it in as something other then jensen or what ever they default it to i really need some help as this is really getting on my nervs

#2
ixobelle

ixobelle
  • Members
  • 109 messages
without having the script example you used, we're not going to be able to help.

#3
tribal15111

tribal15111
  • Members
  • 22 messages
http://social.biowar...cter_generation

the scripts i got from this wiki page do not work

especially the one:



case EVENT_TYPE_MODULE_START:

{

// skip character generation

object oHero = GetHero();

Chargen_InitializeCharacter(oHero);

Chargen_SelectRace(oHero,RACE_HUMAN);

Chargen_SelectCoreclass(oHero,class_WARRIOR);

Chargen_SelectBackground(oHero,BACKGROUND_NOBLE);



LoadItemsFromTemplate(oHero, "gcd_hero.utc", TRUE);



break;

}

#4
stuntpope

stuntpope
  • Members
  • 112 messages
Is your script appearing in your override directory? Be sure to export the script once you have compiled it.

#5
tribal15111

tribal15111
  • Members
  • 22 messages
i have been doing all that i compile it i get the error:
E: 22:35:42 - module_core_duplicate.nss - module_core_duplicate.nss(1): Invalid declaration type
and i export it and still nothing, this is a direct cut and copy from the wiki site so im not sure if i should be adding something else.

Modifié par tribal15111, 12 novembre 2009 - 03:37 .


#6
ixobelle

ixobelle
  • Members
  • 109 messages
if that's the whole script, that's not going to work. You need to have the entire script (with the includes). I even added text to the top of that specific page (before the scripts) a few days back when I got it to work. you need to attach the script to your module, like it says.

#7
tribal15111

tribal15111
  • Members
  • 22 messages
ok, i hate being a noob but what about the error that keeps popping up even with the includes and now it goes through the character generator which i wanted to skip and i am unable to load the area at all, i know next to nothing about script at this point

#8
tribal15111

tribal15111
  • Members
  • 22 messages
#include "events_h"

#include "global_objects_h"

#include "sys_chargen_h"

#include "utility_h"

#include "var_constants_h"



void main()

{



case EVENT_TYPE_MODULE_START:

{

// skip character generation

object oHero = GetHero();

Chargen_InitializeCharacter(oHero);

Chargen_SelectRace(oHero,RACE_HUMAN);

Chargen_SelectCoreclass(oHero,class_WARRIOR);

Chargen_SelectBackground(oHero,BACKGROUND_NOBLE);



LoadItemsFromTemplate(oHero, "wolf_leader.utc", TRUE);



break;

}}



this is the whole script i get this error

E: 23:13:25 - module_core_duplicate.nss - module_core_duplicate.nss(10): Jumping over declaration statements case disallowed (while compiling var_constants_h.nss)

on line 10 which is the case EVENT_TYPE_MODULE_START: line and i cannot start my area now it also seems to want to go through the char gen wich i do not want it to do

#9
tribal15111

tribal15111
  • Members
  • 22 messages
bump

#10
TimelordDC

TimelordDC
  • Members
  • 923 messages
I haven't looked into dascript in detail yet but if you are using a case statement, there must be a switch command with the variable against which the case commands are to be executed.

In this case, EVENT_TYPE_MODULE_START is obviously a parameter which will be compared against...what?
Check the syntax of the case statement.

Edit: A quick look at the wiki suggests this -
#include "events_h"
#include "global_objects_h"
#include "sys_chargen_h"
#include "utility_h"
#include "var_constants_h"

void main()
{
  event ev = GetCurrentEvent();
  int nEventType = [url=../../../wiki/datoolset/index.php/GetEventType]GetEventType[/url](ev);
  switch(nEventType)
  {
      case EVENT_TYPE_MODULE_START:
            {
              // skip character generation
              object oHero = GetHero();
              Chargen_InitializeCharacter(oHero);
              Chargen_SelectRace(oHero,RACE_HUMAN);
              Chargen_SelectCoreclass(oHero,class_WARRIOR);
              Chargen_SelectBackground(oHero,BACKGROUND_NOBLE);
              LoadItemsFromTemplate(oHero, "wolf_leader.utc", TRUE);
              break;
            }
  }
    }

Modifié par TimelordDC, 12 novembre 2009 - 06:23 .


#11
tribal15111

tribal15111
  • Members
  • 22 messages
ah i see so can i compare it to it self or how do i go about with the switch command, im new to the scripting

ok ill give that a try and see how well it works

EDIT: The above code does go through with out error however all it has done is still implement a standard character into the module not a warewolf and since there is no items defined he is naked wich would not be an issue if i could load the appearance onto my char, back at square one again

Modifié par tribal15111, 12 novembre 2009 - 06:38 .


#12
TimelordDC

TimelordDC
  • Members
  • 923 messages
You do realize that the commands you have there will assign a Human Warrior with Human Noble as the Origin? All you are doing in that script is loading items from the werewolf template onto your character.

#13
tribal15111

tribal15111
  • Members
  • 22 messages
i understand that but i dont know how to load that actual whole template from the warewolf in place of the character with out using the console runscript setappearance 22 i been trying to mess with that particular line of code and i can find the script itself in the debug folder but i dont know how to implement it to auto execute in the script instead of a manual input but with out the proper knowlege of the script language im at a loss


#14
st4rdog

st4rdog
  • Members
  • 104 messages
EDIT. See post below.

Modifié par st4rdog, 12 novembre 2009 - 08:00 .


#15
tribal15111

tribal15111
  • Members
  • 22 messages
sweet its only taken me 2 days to figure that out thanks lots the only thing i was leaving out was the TRUE statement on the end no wonder it didnt work

#16
st4rdog

st4rdog
  • Members
  • 104 messages
#include "events_h"
#include "global_objects_h"
#include "sys_chargen_h"
#include "utility_h"

void main()
{
    event ev = GetCurrentEvent();
    int nEventType = GetEventType(ev); //extract event type from current event
    int nEventHandled = FALSE; //keep track of whether the event has been handled
    switch(nEventType)
    {
         case EVENT_TYPE_MODULE_START:
         {
            // skip character generation
            object oHero = GetHero();
            Chargen_InitializeCharacter(oHero);
            Chargen_SelectGender(oHero,GENDER_MALE);
            Chargen_SelectRace(oHero,RACE_HUMAN);
            Chargen_SelectCoreclass(oHero,class_WARRIOR);
            Chargen_SelectBackground(oHero,BACKGROUND_NOBLE);

            SetAppearanceType(oHero, 22, TRUE);

            break;
         }
    }
    if (!nEventHandled) //If this event wasn't handled by this script, let the core script try
    {
        HandleEvent(ev, RESOURCE_SCRIPT_MODULE_CORE);
    }
}
EDIT: This forum sucks.

#17
TimelordDC

TimelordDC
  • Members
  • 923 messages
Can't you just add your creature to the required 2da file and use its row index?

...and I still do not see where the script you have above gives the werewolf appearance? Shouldn't the hero_young.utc be replaced by the corresponding werewolf appearance file?

Edit: Ignore the questions about the script. Page didn't refresh for me to see your new post. I agree abt the forums :)

Modifié par TimelordDC, 12 novembre 2009 - 08:09 .


#18
tribal15111

tribal15111
  • Members
  • 22 messages
i looked into changing 2da files but it seems a bit complicated i got it to work but it doesnt lvl up
Edit: also the setappearancetype(oHero,22,true) line the 22 is the corrisponding value for the warewolf it can also be done on the console with runscript setappearance 22

Modifié par tribal15111, 12 novembre 2009 - 10:48 .