change the Monster Voice

Scripting particularly to improve NoX is discussed in here

change the Monster Voice

Postby panic » Sun Apr 01, 2018 12:51 am

We can change the monster voice.
(included npc and maiden)

but now, you can not treat monster voice in current map editor.

but this code can it.

Code: Select all
int VoiceList(int num)
{
    int list[75], addr, k;

    if (!list[0])
    {
        addr = GetMemory(0x663eec);
        for (k = 0 ; k < 75 ; k ++)
        {
            list[k] = addr;
            addr = GetMemory(addr + 0x4c);
        }
    }
    return list[num];
}

void MapInitialize()
{
   VoiceList(0); //initialize_get_voice
   FrameTimerWithArg(100, 1, SpawnUrchin);
}

void SpawnUrchin(int wp)
{
   int ptr;
   CreateObject("Urchin", wp);
   ptr = GetMemory(0x750710); //get_latest_created_unit_address
   SetMemory(GetMemory(ptr + 0x2ec) + 0x1e8, VoiceList(11));
   // 11 : Troll voice
}




result video: https://youtu.be/QEfnQPoOCew

voice table:

arg: description(unit name)
    0: _WoundedNPC
    1: _Guard2
    2: _Guard1
    3: _FireKnight2
    4: _FireKnight1
    5: _Wizard2
    6: _Wizard1
    7: _Maiden2
    8: _Maiden1
    9: _MaleNPC2
    10: _MaleNPC1
    11: Troll
    12: WoundedWarrior
    13: WoundedConjurer
    14: WoundedApprentice
    15: WillOWisp
    16: EvilCherub
    17: OgreBrute
    18: OgreWarlord
    19: Spider
    20: HecubahWithOrb
    21: WizardGreen
    22: WeirdlingBeast
    23: AirshipCaptain
    24: Horrendous
    25: Maiden
    26: Necromancer
    27: Hecubah
    28: NPC
    29: SpittingSpider
    30: AlbinoSpider
    31: LichLord
    32: Lich
    33: Beholder
    34: WizardWhite
    35: Wizard
    36: SkeletonLord
    37: Skeleton
    38: Demon
    39: MeleeDemon
    40: EmberDemon
    41: FlyingGolem
    42: Imp
    43: Archer
    44: UrchinShaman
    45: Urchin
    46: Shade
    47: FishSmall
    48: FishBig
    49: GreenFrog
    50: Rat
    51: Bat
    52: SmallAlbinoSpider
    53: SmallSpider
    54: BomberYellow
    55: BomberBlue
    56: BomberGreen
    57: Bomber
    58: Ghost
    59: Swordsman
    60: Wasp
    61: MechanicalGolem
    62: StoneGolem
    63: Mimic
    64: CarnivorousPlant
    65: WhiteWolf
    66: BlackWolf
    67: Wolf
    68: BlackBear
    69: Bear
    70: VileZombie
    71: Zombie
    72: GiantLeech
    73: Scorpion
    74: GruntAxe
panic
Adept
Posts: 281
Joined: Thu Nov 12, 2015 3:47 pm

Re: change the Monster Voice

Postby superjack46 » Sun Apr 01, 2018 6:18 pm

since when is there a freaking getmemory function in noxscript
WOL account: unknownle, character: Maurice Ravel, my NoX related website: http://corner.noxcommunity.com
User avatar
superjack46
Administrateur supérieur
Administrateur supérieur
Posts: 124
Joined: Fri Apr 04, 2014 2:52 pm


Return to Scripting

Who is online

Users browsing this forum: No registered users and 0 guests

cron