The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm6 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
help with my level script.
Author Message
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #1
Sad help with my level script.
Hey there, I am having trouble with this script, for an unknown reason I am not getting experience from monsters. Can someone please advise?

Code:
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//                    Amon Level System                                //
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Version 1.0
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//Based on Claus SCP.
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
//INSTALATION:
// Its really simple.
// First in your sphere.ini add the following events to players and NPC
//(e_player_announce / e_give_exp)
//EX:
// Events related to all NPCs
//EventsPet=e_give_exp
// Events related to all players
//EventsPlayer=e_player_announce
//
//You are done!
//Enjoy!
//Players should use in game .level
////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
[PLEVEL 1]
level
////////////////////////////////////////////////////////////////
//function clear level system
//Use it to disable level system.
[function f_clrlvl]
    TAG0.EXP=
    TAG0..EXP=
    TAG0.LEVELUP=
    TAG0.MYLEVEL=
    TAG0.showxptitle=
    TITLE=
    sysmessage @1947 Level cleared.
////////////////////////////////////////////////////////////////
[function level]
closealldialogs
f_levelup
dialog d_xp_system
////////////////////////////////////////////////////////////////
[Dialog d_xp_system]
100,100
resizepic 10 10 9250 255 260
resizepic 22 24 9550 230 20
button 40 152 11400 11402 1 0 1//dot yes
button 100 152 11400 11402 1 0 2//dot no
button 60 220 11391 11392 1 0 3//red
dtext 100 25 1947 Level System
dtext 120 227 1947 Accept
dtext 40 50 1947 Your Level :
checkertrans 120 50 50 20
dtext 140 50 1947 <eval <TAG0.MYLEVEL>>
dtext 40 70 1947 Current Experience:
checkertrans 40 90 200 20
dtext 100 90 1947 <eval <TAG0.EXP>> / <Eval <TAG0.LEVELUP>>//
dtext 40 130 1947 Use Level Title?
dtext 60 150 1947 Yes
dtext 120 150 1947 No

[Dialog d_xp_system BUTTON]
on=0
    SOUND=291
return 1
ON=1 3
IF (<ARGN>==1)
    TAG0.showxptitle=1
    f_show_xp_title
    Dialog d_xp_system
    Sysmessage @030 You are now showing your level title.
    return 1
ELIF (<ARGN>==2)
    TAG0.showxptitle=
    Dialog d_xp_system
    Sysmessage @030 You choose not to show your level title.
    return 1
ELIF (<ARGN>==3)
    SOUND=291
    return 1
ENDIF
IF !(<isempty <ARGS>>)
IF (<isnum <ARGS>>)
  SOUND=291
ELSE
  SYSMESSAGE @06 <ARGS>
ENDIF
ENDIF
////////////////////////////////////////////////////////////////
// XP SYSTEM
////////////////////////////////////////////////////////////////
//
//getting EXP
//Small, Small Media, Media, Media Large, Large, Large Extra, Extra
//total of 8 types of XP by monsters type
// e_exp_gain_extra_small
// e_exp_gain_small
// e_exp_gain_small_media
// e_exp_gain_media
// e_exp_gain_media_large
// e_exp_gain_large
// e_exp_gain_large_extra
// e_exp_gain_extra
////////////////////////////////////////////////////////////////
//
//Extra small
[EVENTS e_exp_gain_extra_small]
ON=@DEATHCORPSE
Ref1 = <argo.more2>  // More 2 store the killer  uid
IF <Ref1.ISPLAYER>
    LOCAL.EXP_GAIN=<EVAL (RAND(1,4))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained a very small amount of experience.
    RETURN 0
ELSE
if <ref1.memoryfindtype.memory_ipet>
ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
    LOCAL.EXP_GAIN=<EVAL (RAND(1,4))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained a very small amount of experience.
    RETURN 0
ENDIF
ENDIF
//small
[EVENTS e_exp_gain_small]
ON=@DEATHCORPSE
Ref1 = <argo.more2>  // More 2 store the killer  uid
IF <Ref1.ISPLAYER>
    LOCAL.EXP_GAIN=<EVAL (RAND(5,15))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained a small amount of experience.
    RETURN 0
ELSE
if <ref1.memoryfindtype.memory_ipet>
ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
    LOCAL.EXP_GAIN=<EVAL (RAND(5,15))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained a small amount of experience.
    RETURN 0
ENDIF
ENDIF
//small media
[EVENTS e_exp_gain_small_media]
ON=@DEATHCORPSE
Ref1 = <argo.more2>  // More 2 store the killer  uid
IF <Ref1.ISPLAYER>
    LOCAL.EXP_GAIN=<EVAL (RAND(20,30))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an amount of experience.
    RETURN 0
ELSE
if <ref1.memoryfindtype.memory_ipet>
ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
    LOCAL.EXP_GAIN=<EVAL (RAND(20,30))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an amount of experience.
    RETURN 0
ENDIF
ENDIF
//Media
[EVENTS e_exp_gain_media]
ON=@DEATHCORPSE
Ref1 = <argo.more2>  // More 2 store the killer  uid
IF <Ref1.ISPLAYER>
    LOCAL.EXP_GAIN=<EVAL (RAND(35,45))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an amount of experience.
    RETURN 0
ELSE
if <ref1.memoryfindtype.memory_ipet>
ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
    LOCAL.EXP_GAIN=<EVAL (RAND(35,45))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an amount of experience.
    RETURN 0
ENDIF
ENDIF
//media large
[EVENTS e_exp_gain_media_large]
ON=@DEATHCORPSE
Ref1 = <argo.more2>  // More 2 store the killer  uid
IF <Ref1.ISPLAYER>
    LOCAL.EXP_GAIN=<EVAL (RAND(50,65))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an good amount of experience.//<dLOCAL.EXP_GAIN> amount
    RETURN 0
ELSE
if <ref1.memoryfindtype.memory_ipet>
ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
    LOCAL.EXP_GAIN=<EVAL (RAND(50,65))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an good amount of experience.//<dLOCAL.EXP_GAIN> amount
    RETURN 0
ENDIF
ENDIF
//large
[EVENTS e_exp_gain_large]
ON=@DEATHCORPSE
Ref1 = <argo.more2>  // More 2 store the killer  uid
IF <Ref1.ISPLAYER>
    LOCAL.EXP_GAIN=<EVAL (RAND(70,85))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an large amount of experience.
    RETURN 0
ELSE
if <ref1.memoryfindtype.memory_ipet>
ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
    LOCAL.EXP_GAIN=<EVAL (RAND(70,85))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an large amount of experience.
    RETURN 0
ENDIF
ENDIF
//large extra
[EVENTS e_exp_gain_large_extra]
ON=@DEATHCORPSE
Ref1 = <argo.more2>  // More 2 store the killer  uid
IF <Ref1.ISPLAYER>
    LOCAL.EXP_GAIN=<EVAL (RAND(90,105))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an very large amount of experience.
    RETURN 0
ELSE
if <ref1.memoryfindtype.memory_ipet>
ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
    LOCAL.EXP_GAIN=<EVAL (RAND(90,105))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an very large amount of experience.
    RETURN 0
ENDIF
ENDIF
//extra
[EVENTS e_exp_gain_extra]
ON=@DEATHCORPSE
Ref1 = <argo.more2>  // More 2 store the killer  uid
IF <Ref1.ISPLAYER>
    LOCAL.EXP_GAIN=<EVAL (RAND(110,120))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an incredible amount of experience.
    RETURN 0
ELSE
if <ref1.memoryfindtype.memory_ipet>
ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
    LOCAL.EXP_GAIN=<EVAL (RAND(110,120))> //your choice.
    Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
    Ref1.f_levelup //check if you have lvl up.
    Ref1.SYSMESSAGE @030 You gained an incredible amount of experience.
    RETURN 0
ENDIF
ENDIF
////////////////////////////////////////////////////////////////
//Function LEVEL UP
[FUNCTION f_levelup]
f_show_xp_title
IF <TAG0.EXP> >= <TAG0.LEVELUP>
   SYSMESSAGE @030 You gain a level!
    TAG0.EXP=1
    TAG0.LEVELUP += 1000
    TAG0.MYLEVEL += 1
//effect
serv.NEWITEM=i_fx_sparkle
new.P=<P>
new.TYPE=t_normal
new.TIMER=3
new.ATTR=attr_static|attr_move_never|attr_decay
SOUND=284//1462
ELSE
//SYSMESSAGE @030 You still need more experience to level up.
ENDIF
////////////////////////////////////////////////////////////////
[function f_show_xp_title]
if (<TAG0.showxptitle> == 1)
    IF <TAG0.MYLEVEL> <= 5
        TITLE=Younger
    ELIF <TAG0.MYLEVEL> <= 10
        TITLE=Brave
    ELIF <TAG0.MYLEVEL> <= 30
        TITLE=Achiever
    ELIF <TAG0.MYLEVEL> <= 50
        TITLE=Unstoppable
    ELIF <TAG0.MYLEVEL> <= 150
        TITLE=Commander
    ELIF <TAG0.MYLEVEL> <= 300
        TITLE=Grand General
    ELIF <TAG0.MYLEVEL> <= 600
        TITLE=Shadow Lord
    ELIF <TAG0.MYLEVEL> <= 1000
        TITLE=Mystical Lord
    ELIF <TAG0.MYLEVEL> <= 10000
        TITLE=Revenant Lord
    endif
else
    TITLE=
endif
endif
////////////////////////////////////////////////////////////////
[events e_give_exp]
ON=@Death
If !<brain>
return 0
    ELSE
    e_lootbonus
        IF <eval <i.STR> + <i.DEX>> <= 150
            i.events= +e_exp_gain_extra_small
            i.say @030 <eval <i.STR> + <i.DEX>> XP
                ELIF <eval <i.STR> + <i.DEX>> <= 260
            i.events= +e_exp_gain_small
            i.say @030 <eval <i.STR> + <i.DEX>> XP
                ELIF <eval <i.STR> + <i.DEX>> <= 370
            i.events= +e_exp_gain_small_media
            i.say @030 <eval <i.STR> + <i.DEX>> XP
                ELIF <eval <i.STR> + <i.DEX>> <= 480
            i.events= +e_exp_gain_media
            i.say @030 <eval <i.STR> + <i.DEX>> XP
                ELIF <eval <i.STR> + <i.DEX>> <= 590
            i.events= +e_exp_gain_media_large
            i.say @030 <eval <i.STR> + <i.DEX>> XP
                ELIF <eval <i.STR> + <i.DEX>> <= 610
            i.events= +e_exp_gain_large
            i.say @030 <eval <i.STR> + <i.DEX>> XP
                ELIF <eval <i.STR> + <i.DEX>> <= 750
            i.events= +e_exp_gain_large_extra
            i.say @030 <eval <i.STR> + <i.DEX>> XP
                ELIF <eval <i.STR> + <i.DEX>> <= 850
            i.events= +e_exp_gain_extra
            i.say @030 <eval <i.STR> + <i.DEX>> XP
                ELSE
            i.events= +e_exp_gain_extra
            i.say @030 <eval <i.STR> + <i.DEX>> XP
        Endif
Endif
////////////////////////////////////////////////////////////////
[EVENTS e_player_announce]
ON=@CLICK
IF <ISPLAYER>
    IF <TAG0.showxptitle> == 1
    IF <KILLS> >= 1
    MESSAGE @026 <name>
    MESSAGE @030 <TITLE>
    ELSE
    MESSAGE @0c6 <name>
    MESSAGE @030 <TITLE>
    ENDIF
    ELSE
    IF <SRC.KILLS> >= 1
    MESSAGE @026 <name>
    MESSAGE @030 <TITLE>
    ELSE
    MESSAGE @0c6 <name>
    MESSAGE @030 <TITLE>
    ENDIF
    ENDIF
ENDIF


on=@DCLICK
IF <ISPLAYER>
    IF <TAG0.showxptitle> == 1
    IF <KILLS> >= 1
    MESSAGE @026 <name>
    MESSAGE @030 <TITLE>
    ELSE
    MESSAGE @07a5 <name>
    MESSAGE @030 <TITLE>
    ENDIF
    ELSE
    IF <SRC.KILLS> >= 1
    MESSAGE @026 <name>
    MESSAGE @030 <TITLE>
    ELSE
    MESSAGE @07a5 <name>
    MESSAGE @030 <TITLE>
    ENDIF
    ENDIF
ENDIF

///////////////////////////////////////////////////////////////////
//        reward system                //
//////////////////////////////////////////////////////////////////
// checks the level - bonus to each level gets more ps/gold from monsters loot
// >level = +ps,+gold
// ps drop rate (r100,r99,98...)
// gold amount (+25,+50,+100,+150...)
// message to each kill
// event to all npc to check lootbonus
//////////////////////////////////////////////////////////////////
[Function e_lootbonus]
IF <tag0.mylevel>
F_check_level_reward
//
e_LOOTBONUS
ENDIF

[FUNCTION F_check_level_reward]
if <eval <tag0.mylevel> ==1>
    if <eval <tag0.mylevel> <=1>
    tag0.lootbonus=1
elif <eval <tag0.mylevel> <=5>
    tag0.lootbonus=2
elif <eval <tag0.mylevel> <=10>
    tag0.lootbonus=3
elif <eval <tag0.mylevel> <=15>
    tag0.lootbonus=4
elif <eval <tag0.mylevel> <=20>
    tag0.lootbonus=5
elif <eval <tag0.mylevel> <=25>
    tag0.lootbonus=6
elif <eval <tag0.mylevel> <=30>
    tag0.lootbonus=7
elif <eval <tag0.mylevel> <=35>
    tag0.lootbonus=8
elif <eval <tag0.mylevel> <=40>
    tag0.lootbonus=9
elif <eval <tag0.mylevel> <=45>
    tag0.lootbonus=10
elif <eval <tag0.mylevel> <=50>
    tag0.lootbonus=11
elif <eval <tag0.mylevel> <=55>
    tag0.lootbonus=12
elif <eval <tag0.mylevel> <=60>
    tag0.lootbonus=13
elif <eval <tag0.mylevel> <=65>
    tag0.lootbonus=14
elif <eval <tag0.mylevel> <=70>
    tag0.lootbonus=15
elif <eval <tag0.mylevel> <=75>
    tag0.lootbonus=16
elif <eval <tag0.mylevel> <=80>
    tag0.lootbonus=17
elif <eval <tag0.mylevel> <=85>
    tag0.lootbonus=18
elif <eval <tag0.mylevel> <=90>
    tag0.lootbonus=19
elif <eval <tag0.mylevel> <=95>
    tag0.lootbonus=20
elif <eval <tag0.mylevel> <=100>
    tag0.lootbonus=21
endif
endif

[events e_LOOTBONUS]
ON=@DeathCorpse
IF <act.TAG0.lootbonus> <= 1
serv.newitem i_gold,{5 10},<ARGO>
        //
        IF (<EVAL RAND(99)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 2
serv.newitem i_gold,{5 20},<ARGO>
        //
        IF (<EVAL RAND(94)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 3
serv.newitem i_gold,{5 30},<ARGO>
        //
        IF (<EVAL RAND(89)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 4
serv.newitem i_gold,{5 40},<ARGO>
        //
        IF (<EVAL RAND(84)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 5
serv.newitem i_gold,{5 50},<ARGO>
        //
        IF (<EVAL RAND(79)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 6
serv.newitem i_gold,{10 60},<ARGO>
        //
        IF (<EVAL RAND(74)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 7
serv.newitem i_gold,{10 70},<ARGO>
        //
        IF (<EVAL RAND(69)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 8
serv.newitem i_gold,{10 80},<ARGO>
        //
        IF (<EVAL RAND(64)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 9
serv.newitem i_gold,{10 90},<ARGO>
        //
        IF (<EVAL RAND(59)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 10
serv.newitem i_gold,{10 100},<ARGO>
        //
        IF (<EVAL RAND(54)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 11
serv.newitem i_gold,{15 110},<ARGO>
        //
        IF (<EVAL RAND(49)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 12
serv.newitem i_gold,{15 120},<ARGO>
        //
        IF (<EVAL RAND(44)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 13
serv.newitem i_gold,{15 130},<ARGO>
        //
        IF (<EVAL RAND(39)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 14
serv.newitem i_gold,{15 140},<ARGO>
        //
        IF (<EVAL RAND(34)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 15
serv.newitem i_gold,{15 150},<ARGO>
        //
        IF (<EVAL RAND(30)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 16
serv.newitem i_gold,{20 160},<ARGO>
        //
        IF (<EVAL RAND(30)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 17
serv.newitem i_gold,{20 170},<ARGO>
        //
        IF (<EVAL RAND(30)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 18
serv.newitem i_gold,{20 180},<ARGO>
        //
        IF (<EVAL RAND(30)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 19
serv.newitem i_gold,{20 190},<ARGO>
        //
        IF (<EVAL RAND(30)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 20
serv.newitem i_gold,{20 200},<ARGO>
        //
        IF (<EVAL RAND(30)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //    
ELIF <act.TAG0.lootbonus> <= 21
serv.newitem i_gold,{50 210},<ARGO>
        //
        IF (<EVAL RAND(20)> == 1)  
            serv.newitem power_scrolls,1,<ARGO>
        endif
        //
EndiF

[DEFNAME power_scrolls]
power_scrolls {i_power_scroll_ALCHEMY 1 i_power_scroll_Anatomy 1 i_power_scroll_AnimalLore 1 i_power_scroll_ItemID 1 i_power_scroll_ArmsLore 1 i_power_scroll_Parrying 1 i_power_scroll_Begging 1 i_power_scroll_Blacksmithing 1 i_power_scroll_Bowcraft 1 i_power_scroll_Peacemaking 1 i_power_scroll_Camping 1 i_power_scroll_Carpentry 1 i_power_scroll_Cartography 1 i_power_scroll_Cooking 1 i_power_scroll_DetectingHidden 1 i_power_scroll_Enticement 1 i_power_scroll_EvaluatingIntel 1 i_power_scroll_Healing 1 i_power_scroll_Fishing 1 i_power_scroll_Forensics 1 i_power_scroll_Herding 1 i_power_scroll_Hiding 1 i_power_scroll_Provocation 1 i_power_scroll_Inscription 1 i_power_scroll_LockPicking 1 i_power_scroll_Magery 1 i_power_scroll_MagicResistance 1 i_power_scroll_Tactics 1 i_power_scroll_Snooping 1 i_power_scroll_Musicianship 1 i_power_scroll_Poisoning 1 i_power_scroll_Archery 1 i_power_scroll_SpiritSpeak 1 i_power_scroll_Stealing 1 i_power_scroll_Tailoring 1 i_power_scroll_Taming 1 i_power_scroll_TasteID 1 i_power_scroll_Tinkering 1 i_power_scroll_Tracking 1 i_power_scroll_Tracking 1 i_power_scroll_Veterinary 1 i_power_scroll_Swordsmanship 1 i_power_scroll_Macefighting 1 i_power_scroll_Fencing 1 i_power_scroll_Wrestling 1 i_power_scroll_Wrestling 1 i_power_scroll_Lumberjacking 1 i_power_scroll_Mining 1 i_power_scroll_Meditation 1 i_power_scroll_Stealth 1 i_power_scroll_RemoveTrap 1 i_power_scroll_Necromancy 1 i_power_scroll_Focus 1 i_power_scroll_Chivalry 1 i_power_scroll_Bushido 1 i_power_scroll_Ninjitsu 1 i_power_scroll_Spellweaving 1 i_power_scroll_Mysticism 1 i_power_scroll_Imbuing 1 i_power_scroll_Throwing 1}
[EOF]
01-06-2018 07:54 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
evening
Journeyman
*

Posts: 138
Likes Given: 0
Likes Received: 14 in 9 posts
Joined: Apr 2012
Reputation: 1

Finally Land

Post: #2
RE: help with my level script.
My English is not good!
You mean you can not get the experience from monsters?
01-08-2018 11:49 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #3
RE: help with my level script.
yeah, I get the message though, when the monster is killed, but the tag level is no getting more numbers, so the level doesn't go up. Sad
01-14-2018 05:47 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
darksun84
Sir Spamalot
****

Posts: 1,687
Likes Given: 245
Likes Received: 162 in 151 posts
Joined: Mar 2012
Reputation: 35



Post: #4
RE: help with my level script.
Is "SYSMESSAGE @030 You gain a level!" fired?
01-14-2018 08:40 AM
Find all posts by this user Like Post Quote this message in a reply
evening
Journeyman
*

Posts: 138
Likes Given: 0
Likes Received: 14 in 9 posts
Joined: Apr 2012
Reputation: 1

Finally Land

Post: #5
RE: help with my level script.
[events e_give_exp]
ON=@Death
ref1 = <attacker.max> // or use attacker.last
If !<brain>
return 0
ELSE
e_lootbonus
IF <eval <i.STR> + <i.DEX>> <= 150
local.exp = <eval <i.STR> + <i.DEX>>
//i.events= +e_exp_gain_extra_small
e_exp_gain_extra_small <dlocal.exp>,<ref1>
i.say @030 <dlocal.exp> XP

[function e_exp_gain_extra_small]
local.exp_gain = <argv[0]>
Ref1 = <argv[1]>
IF <Ref1.ISPLAYER>
Ref1.TAG0.EXP += <dLOCAL.EXP_gain>
Ref1.f_levelup
Ref1.SYSMESSAGE @030 You gained a very small amount of experience.
ELSE
if <ref1.memoryfindtype.memory_ipet>
ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
Ref1.f_levelup //check if you have lvl up.
Ref1.SYSMESSAGE @030 You gained a very small amount of experience.
ENDIF
ENDIF

///////////////////////////////////////
I do not know if this is what you need
If not, I will modify it
(This post was last modified: 01-14-2018 04:56 PM by evening.)
01-14-2018 04:54 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes evening's post
amonvangrell
Banned

Posts: 337
Likes Given: 17
Likes Received: 32 in 20 posts
Joined: Aug 2012

britannia shard

Post: #6
RE: help with my level script.
Code:
[quote='evening' pid='27463' dateline='1515912864']
[events e_give_exp]
ON=@Death
ref1 = <attacker.max> // or use attacker.last
If !<brain>
return 0
    ELSE
    e_lootbonus
        IF <eval <i.STR> + <i.DEX>> <= 150
            local.exp = <eval <i.STR> + <i.DEX>>
            //i.events= +e_exp_gain_extra_small
            e_exp_gain_extra_small <dlocal.exp>,<ref1>
            i.say @030 <dlocal.exp> XP

[function e_exp_gain_extra_small]
local.exp_gain = <argv[0]>
Ref1 = <argv[1]>
IF <Ref1.ISPLAYER>
    Ref1.TAG0.EXP += <dLOCAL.EXP_gain>
    Ref1.f_levelup
    Ref1.SYSMESSAGE @030 You gained a very small amount of experience.
ELSE
    if <ref1.memoryfindtype.memory_ipet>
        ref1 = <ref1.memoryfindtype.memory_ipet.link.uid>
        Ref1.TAG0.EXP += <dLOCAL.EXP_GAIN>
        Ref1.f_levelup //check if you have lvl up.
        Ref1.SYSMESSAGE @030 You gained a very small amount of experience.
    ENDIF
ENDIF

///////////////////////////////////////
I do not know if this is what you need
If not, I will modify it
[/quote]

I think you've fixed it! Many thanks, boss! Smile
01-21-2018 09:17 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
evening
Journeyman
*

Posts: 138
Likes Given: 0
Likes Received: 14 in 9 posts
Joined: Apr 2012
Reputation: 1

Finally Land

Post: #7
RE: help with my level script.
glad to help you
01-22-2018 12:06 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 4 Guest(s)