Giving a monster...

Here you can post threads requesting help on the official POL Ultima Online Emulator Core 095. Note: Core 095 is no longer officially supported.
Post Reply
Damiens friend

Giving a monster...

Post by Damiens friend »

Okay i would need some help... I don't know where to start but the thing i
need help is giving a moster a certain amount of EXP and level. I want it to be quite easy to change the EXP amount and what lvl a moster got.
Something like this

Code: Select all

NPCTEMPLATE  snake
{
    Name                   a snake
    script                   killPCs
    objtype                0x0034
    Color                   0x0000
    TrueColor             0x0000
    Gender                 0
    STR                     34
    DEX                     25
    INT                      10
    HITS                    34
    LEVEL                   1
    EXP                      100
    STAM                   25
    MANA                   0
    AttackSpeed         35
    AttackDamage      2D4
    AttackAttribute      Wrestling
The EXP should be written in scrips>misc>death.src well atleast ive been told that. But i don't know how to make the script read how much EXP the monster got and the give it to the player.

I wanna know how to display the level over the monster like [Level:1] but thats not necessary.

Thanks
Im using POL095...
FreeSoul
Master Poster
Posts: 90
Joined: Sat Feb 04, 2006 9:14 am

Post by FreeSoul »

Well...

In NPCkeeper.src make few setobjproperty for every created snake/monster/etc (if in npcdesc.cfg it have EXP). As i think you woul'd like to use such system for other NPC'es.
Your snake is lvl 1 and 100 exp
but for example you would like to have few snakes with different EXP and LEVEL.
Sooooooooo...
back to NPCkeeper

Code: Select all

var pncfg := ReadConfigFile("npcdesc");
var maxlevel := pncfg[who.npctemplate].LEVEL;
var exp:=pncfg[who.npctemplate].EXP;
var lvl:=randomint(maxlevel)+1;
setobjproperty(who,"LEVEL",lvl);
setobjproperty(who,"EXP",exp*lvl);
rename(who,who.name+" [level:"+lvl+"]";
every lvl is worth lvl*exp

it's just my idea...
Damiens friend

Post by Damiens friend »

Yea that sounds nice. and for giving the player who killed a monster that amount of experience i would need to write something in death.src right?
like

Code: Select all

  var EXP := CInt(GetObjProperty(corpse, "EXP"));
   SetObjProperty(killer, "expe", (expe + EXP));
[/code]
Gnafu
Grandmaster Poster
Posts: 136
Joined: Thu Feb 02, 2006 7:29 am

Post by Gnafu »

but different levels snakes are the same snake...

i mean:

you don't have any difficult to kill a snake level 200 if you are able to kil a snake level 1..

you must change some snake's stat too....

:king:
FreeSoul
Master Poster
Posts: 90
Joined: Sat Feb 04, 2006 9:14 am

Post by FreeSoul »

yes... you can change them their base str,dex,int using their lvl
you can change their skill value
Damiens friend

Post by Damiens friend »

Well the snake was just an example how i would want to write how much exp and level a monster would have.
User avatar
Tritan
Grandmaster Poster
Posts: 147
Joined: Sat Feb 04, 2006 8:17 am

Post by Tritan »

I did something like this on my server. I set an experience tag on each npc template with a value of 1 to 5. (level 1 to 5)

With this I do a check in the death and loot scripts to determine how much experience and loot will be found on each npc. Then I take that value and put a small random chance on top of it to keep things somewhat random within a given range.

Just a thought on other ways to do this.
Post Reply