Snaigel
Journeyman
Posts: 75
Likes Given: 0
Likes Received: 1 in 1 posts
Joined: Jan 2017
Reputation: 0
|
Reward system based on char level
I'm using this reward system which does a probability to drop a power scroll on @deathcorpse, so it does on any dead npc corpse, but I want to make some exceptions of npcs... any ideas?
This is the reward system script:
Quote:///////////////////////////////////////////////////////////////////
// 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,{10 20},<ARGO>
//
IF (<EVAL RAND(98)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 2
serv.newitem i_gold,{20 40},<ARGO>
//
IF (<EVAL RAND(94)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 3
serv.newitem i_gold,{30 60},<ARGO>
//
IF (<EVAL RAND(89)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 4
serv.newitem i_gold,{80 100},<ARGO>
//
IF (<EVAL RAND(84)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 5
serv.newitem i_gold,{100 150},<ARGO>
//
IF (<EVAL RAND(79)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 6
serv.newitem i_gold,{150 200},<ARGO>
//
IF (<EVAL RAND(74)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 7
serv.newitem i_gold,{200 220},<ARGO>
//
IF (<EVAL RAND(69)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 8
serv.newitem i_gold,{200 240},<ARGO>
//
IF (<EVAL RAND(64)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 9
serv.newitem i_gold,{240 255},<ARGO>
//
IF (<EVAL RAND(59)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 10
serv.newitem i_gold,{250 270},<ARGO>
//
IF (<EVAL RAND(54)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 11
serv.newitem i_gold,{270 280},<ARGO>
//
IF (<EVAL RAND(49)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 12
serv.newitem i_gold,{290 300},<ARGO>
//
IF (<EVAL RAND(44)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 13
serv.newitem i_gold,{290 300},<ARGO>
//
IF (<EVAL RAND(39)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 14
serv.newitem i_gold,{290 310},<ARGO>
//
IF (<EVAL RAND(34)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 15
serv.newitem i_gold,{295 315},<ARGO>
//
IF (<EVAL RAND(30)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 16
serv.newitem i_gold,{312 315},<ARGO>
//
IF (<EVAL RAND(30)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 17
serv.newitem i_gold,{310 318},<ARGO>
//
IF (<EVAL RAND(30)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 18
serv.newitem i_gold,{318 322},<ARGO>
//
IF (<EVAL RAND(30)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 19
serv.newitem i_gold,{316 325},<ARGO>
//
IF (<EVAL RAND(30)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 20
serv.newitem i_gold,{315 333},<ARGO>
//
IF (<EVAL RAND(30)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
ELIF <act.TAG0.lootbonus> <= 21
serv.newitem i_gold,{333 400},<ARGO>
//
IF (<EVAL RAND(20)> == 1)
serv.newitem power_scrolls,1,<ARGO>
endif
//
EndiF
|
|