PenUltima Online Forum Index Official Core: 096.7
Official Core: 097 2008-02-26
Donate towards the POL web hosting bill!
 POL Home   FAQ   Search    Memberlist   Usergroups    Register    Profile   Log in to check your private messages   Log in
Giving a monster...

 
Post new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095)
Display posts from previous:   

Author Message
Damiens friend



Joined: 19 Apr 2006
Posts: 3

PostPosted: Fri Apr 21, 2006 3:25 pm    Post subject: Giving a monster... Reply with quote

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...

Author Message
FreeSoul



Joined: 04 Feb 2006
Posts: 90
Location: Aman

PostPosted: Fri Apr 21, 2006 3:55 pm    Post subject: Reply with quote

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...

Author Message
Damiens friend



Joined: 19 Apr 2006
Posts: 3

PostPosted: Sat Apr 22, 2006 3:08 am    Post subject: Reply with quote

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]

Author Message
Gnafu



Joined: 02 Feb 2006
Posts: 88
Location: Livorno, Italy

PostPosted: Sat Apr 22, 2006 3:36 am    Post subject: Reply with quote

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:

Author Message
FreeSoul



Joined: 04 Feb 2006
Posts: 90
Location: Aman

PostPosted: Sat Apr 22, 2006 5:34 am    Post subject: Reply with quote

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

Author Message
Damiens friend



Joined: 19 Apr 2006
Posts: 3

PostPosted: Sun Apr 23, 2006 2:51 pm    Post subject: Reply with quote

Well the snake was just an example how i would want to write how much exp and level a monster would have.

Author Message
Tritan



Joined: 04 Feb 2006
Posts: 136
Location: Illinois, USA

PostPosted: Sun Apr 23, 2006 4:13 pm    Post subject: Reply with quote

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 new topic   Reply to topic    PenUltima Online Forum Index -> General Help (095) All times are GMT - 4 Hours
Page 1 of 1

 




Powered by phpBB © 2001, 2005 phpBB Group :: Theme & Graphics by GHS & Scott E. Royalty