PenUltima Online

It is currently Fri Aug 29, 2008 4:30 pm

All times are UTC - 8 hours




Post new topic Reply to topic  [ 7 posts ] 
Author Message
 Post subject: Giving a monster...
PostPosted: Fri Apr 21, 2006 11:25 am 
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:
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...


Top
  
 
 Post subject:
PostPosted: Fri Apr 21, 2006 11:55 am 
Offline

Joined: Sat Feb 04, 2006 9:14 am
Posts: 90
Location: Aman
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:
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...

_________________
Ash nazg durbatuluk, ash nazg gimbatul, ash nazg thrakatuluk agh burzum-ishi krimpatul


Top
 Profile  
 
 Post subject:
PostPosted: Fri Apr 21, 2006 11:08 pm 
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:
  var EXP := CInt(GetObjProperty(corpse, "EXP"));
   SetObjProperty(killer, "expe", (expe + EXP));
[/code]


Top
  
 
 Post subject:
PostPosted: Fri Apr 21, 2006 11:36 pm 
Offline

Joined: Thu Feb 02, 2006 7:29 am
Posts: 90
Location: Livorno, Italy
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:

_________________
Gnafu
DRL freelance scripter :D


Top
 Profile  
 
 Post subject:
PostPosted: Sat Apr 22, 2006 1:34 am 
Offline

Joined: Sat Feb 04, 2006 9:14 am
Posts: 90
Location: Aman
yes... you can change them their base str,dex,int using their lvl
you can change their skill value

_________________
Ash nazg durbatuluk, ash nazg gimbatul, ash nazg thrakatuluk agh burzum-ishi krimpatul


Top
 Profile  
 
 Post subject:
PostPosted: Sun Apr 23, 2006 10:51 am 
Well the snake was just an example how i would want to write how much exp and level a monster would have.


Top
  
 
 Post subject:
PostPosted: Sun Apr 23, 2006 12:13 pm 
Offline
User avatar

Joined: Sat Feb 04, 2006 8:17 am
Posts: 136
Location: Illinois, USA
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.

_________________
2nd place is the 1st loser.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 7 posts ] 

All times are UTC - 8 hours


Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group
Style based on FI Subice by phpBBservice.nl