Osirirs
Journeyman
Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2
|
Lvl System Help
Hey guys, so im wondering whats wrong with this, the original is not mine,
I've tried editing it with what I know so far:
Quote:[FUNCTION f_levelup]
TAG.LEVEL=<EVAL <TAG.LEVEL>> +1
EFFECT=3,i_fx_heal_effect,15,15,1
SOUND=SND_SPELL_LIGHTNING
SRC.SYSMESSAGE=@75 You have gained a level!
SRC.SYSMESSAGE=@75 You are now level <EVAL <TAG.LEVEL>>!
SRC.NEWITEM i_stat_point
SRC.ACT.AMOUNT {2 3}
SRC.ACT.BOUNCE
IF (<EVAL <TAG.EXP>> > <EVAL <TAG.EXPNEEDED>>)
f_check
Return 1
ENDIF
I'm trying to get stat points when leveling up, If I use the function manually I get them, but if I gain a level by killing mobs, all I get is console errors such as follow:
Quote:10:08:ERROR:(System - Level.scp,288)Undefined keyword 'SYSMESSAGE'
10:08:ERROR:(System - Level.scp,288)Undefined keyword 'SYSMESSAGE'
10:08:ERROR:(System - Level.scp,289)Undefined keyword 'SYSMESSAGE'
10:08:ERROR:(System - Level.scp,289)Undefined keyword 'SYSMESSAGE'
10:08:ERROR:(System - Level.scp,291)Undefined keyword 'ACT.AMOUNT'
10:08:ERROR:(System - Level.scp,291)Undefined keyword 'ACT.AMOUNT'
10:08:ERROR:(System - Level.scp,292)Undefined keyword 'ACT.BOUNCE'
10:08:ERROR:(System - Level.scp,292)Undefined keyword 'ACT.BOUNCE'
I think it has something to do wih the experience function but I'll say I'm a little lost at the moment.
Here's the whole thing:
Quote:[EVENTS e_exp]
ON=@CLICK
VAR.X=<EVAL <oSTR> /6>
IF !(0<VAR.X>)
VAR.X=1
ENDIF
message @025,3 (Level: <EVAL <VAR.X>>)
ON=@DEATH
SRC.TAG.KS=
VAR.OLD_ACT=<ACT>
VAR.X1=<EVAL <oSTR> /1> +<EVAL <oSTR> /1>
VAR.X=<EVAL {<VAR.X1> <oSTR>}>
SRC.f_experience
ACT=<VAR.OLD_ACT>
VAR.X1=
[EVENTS e_exp_1]
ON=@CLICK
VAR.X=<EVAL <oSTR> /1>
IF !(0<VAR.X>)
VAR.X=1
ENDIF
ON=@DEATH
src.consume 1000 i_memory
SRC.TAG.KS=
VAR.OLD_ACT=<ACT>
VAR.X1=<EVAL <oSTR> /1> +<EVAL <oSTR> /1>
VAR.X=<EVAL {<VAR.X1> <oSTR>}>
SRC.f_experience
ACT=<VAR.OLD_ACT>
VAR.X1=
[events e_man]
ON=@DEATH
SRC.TAG.KS=0
VAR.OLD_ACT=<ACT>
VAR.X1=<EVAL <oSTR> /1> +<EVAL <oSTR> /1>
VAR.X=<EVAL {<VAR.X1> <oSTR>}>
SRC.f_experience
ACT=<VAR.OLD_ACT>
VAR.X1=
[FUNCTION resetlevel]
SRC.TAG.KS=0
SRC.TAG.LEVEL=1
SRC.TAG.EXP=1
SRC.TAG.EXPNEEDED=100
SRC.sysmessage=@055 Your level have been reseted.
return 1
[EVENTS e_SHOW]
ON=@CLICK
IF (<EVAL <TAG.KS>> >= 50)
message @25 [TOTAL RECALL]
ELSEIF (<EVAL <TAG.KS>> >= 45)
message @25 [Recall]
ELSEIF (<EVAL <TAG.KS>> >= 40)
message @25 [Wicked Sick]
ELSEIF (<EVAL <TAG.KS>> >= 35)
message @25 [Realy Mad]
ELSEIF (<EVAL <TAG.KS>> >= 25)
message @25 [Mad]
ELSEIF (<EVAL <TAG.KS>> >= 20)
message @25 [Godlike]
ELSEIF (<EVAL <TAG.KS>> >= 15)
message @25 [unstoppeble]
ELSEIF (<EVAL <TAG.KS>> >= 10)
message @25 [Dominating]
ELSEIF (<EVAL <TAG.KS>> >= 8)
message @25 [Rampage]
ELSEIF (<EVAL <TAG.KS>> >= 5)
message @25 [Killing Spree]
Else
message @065 (Level: <EVAL <TAG.LEVEL>>)
ENDIF
[FUNCTION f_check]
IF (<EVAL <TAG.EXP>> > <EVAL <TAG.EXPNEEDED>>)
IF (<EVAL <TAG.LEVEL>> > 1500)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +500000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 1400)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +400000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 1300)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +300000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 1200)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +250000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 1100)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +200000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 1000)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +160000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 900)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +130000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 800)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +110000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 700)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +100000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 600)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +90000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 550)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +80000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 500)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +60000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 400)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +25000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 200)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +23000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 100)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +20000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 75)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +18000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 50)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +15000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 40)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +9000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 30)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +8500
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 25)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +7500
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 20)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +6500
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 18)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +6000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 16)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +5000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 14)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +4000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 12)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +3500
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> >= 10)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +3000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==9)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +2600
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==8)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +2400
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==7)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +2000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==6)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +1800
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==5)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +1500
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==4)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +1000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==3)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +800
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==2)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +400
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==1)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +250
f_levelup
ENDIF
ENDIF
[FUNCTION f_levelup]
TAG.LEVEL=<EVAL <TAG.LEVEL>> +1
EFFECT=3,i_fx_heal_effect,15,15,1
SOUND=SND_SPELL_LIGHTNING
SRC.SYSMESSAGE=@75 You have gained a level!
SRC.SYSMESSAGE=@75 You are now level <EVAL <TAG.LEVEL>>!
SRC.NEWITEM i_stat_point
SRC.ACT.AMOUNT {2 3}
SRC.ACT.BOUNCE
IF (<EVAL <TAG.EXP>> > <EVAL <TAG.EXPNEEDED>>)
f_check
Return 1
ENDIF
[FUNCTION f_experience]
FORCHARLAYER 30
IF (<BASEID>==i_memory)
IF (<LINK.ISCHAR>)
IF !(<LINK.NPC>)
IF (<COLOR> & 08) || (<COLOR> & 010) || (<COLOR> & 020) || (<COLOR> & 080) || (<COLOR> & 02000)
IF (<TOPOBJ.ISCHAR>)
IF !(<TOPOBJ.NPC>)
LINK.TAG.KS=0<LINK.TAG.KS> +1
LINK.SYSMESSAGE @23 You have killed a total of <EVAL 0<LINK.TAG.KS>> players without dying!
LINK.TAG.KILLS=0<LINK.TAG.KILLS> +1
LINK.SYSMESSAGE @23 You have killed a total of <EVAL 0<LINK.TAG.KILLS>> players!
LINK.f_ks_announce
ENDIF
ENDIF
VAR.OLD_ACT=<LINK.ACT.UID>
LINK.NEWITEM=i_experience_level
LINK.ACT.TAG.EXP=<EVAL <VAR.X>>
LINK.ACT.CONT=<LINK.UID>
LINK.ACT.TIMER=0
LINK.ACT=<VAR.OLD_ACT>
VAR.OLD_ACT=
ENDIF
ENDIF
ENDIF
ENDIF
ENDFOR
[ITEMDEF i_experience_level]
DEFNAME=i_experience_level
NAME=Experience
ID=i_memory
WEIGHT=0
LAYER=30
TYPE=T_EQ_SCRIPT
ON=@CREATE
ATTR=attr_invis|attr_move_never
ON=@TIMER
IF ( <CONT.FLAGS> & statf_dead )
REMOVE
RETURN 1
ENDIF
CONT.SYSMESSAGE @55,3 You have gained <EVAL <TAG0.EXP>> experience!
CONT.TAG.EXP += <TAG0.EXP>
CONT.f_check
REMOVE
RETURN 1
[FUNCTION level]
Dialog d_levelm
IF (<EVAL <TAG.EXP>> > <EVAL <TAG.EXPNEEDED>>)
IF (<EVAL <TAG.LEVEL>> > 50)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +50000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 40)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +40000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 30)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +30000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 25)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +25000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 20)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +20000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 18)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +17500
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 16)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +15000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 14)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +14000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> > 12)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +13000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>> >= 10)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +12000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==9)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +11000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==8)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +10000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==7)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +9000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==6)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +8000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==5)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +4000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==4)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +2000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==3)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +1000
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==2)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +500
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==1)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +250
f_levelup
ELSEIF (<EVAL <TAG.LEVEL>>==0)
TAG.EXPNEEDED=<EVAL <TAG.EXPNEEDED>> +5
f_levelup
ENDIF
ENDIF
[DIALOG d_level]
0,0
gumppic 0 0 102
text 70 60 99 0
text 50 245 25 1
text 70 100 33 2
text 70 120 33 3
text 70 150 33 4
text 70 170 33 5
button 50 110 1209 1210 1 0 1
button 50 160 1209 1210 1 0 2
[DIALOG d_level TEXT]
Level System
Exp Needed=<EVAL 0<TAG.EXPNEEDED> +-0<TAG.EXP>>
View Kills
And Deaths
Dont View
Kills And Deaths
[DIALOG d_level BUTTON]
ON=1 View Kills And Deaths
Events +e_kills
events -e_level
ON=2 Dont View Kills And Deaths
Events -e_kills
events +e_level
//*********************
// Killing Spree System
[FUNCTION f_ks_announce]
IF (<EVAL <TAG.KS>> >= 50)
SERV.B @3 TOTAL RECALL! <NAME> is killing everyone! Someone stop the carnage!
ELSEIF (<EVAL <TAG.KS>> >= 45)
SERV.B @3 RECALL ! <NAME> are murdering everyone! Can someone kill him!
ELSEIF (<EVAL <TAG.KS>> >= 40)
SERV.B @3 <NAME> are wicked sick! Someone have to pawn him!
ELSEIF (<EVAL <TAG.KS>> >= 35)
SERV.B @3 <NAME> is realy mad! OMG! noone can kill him.
ELSEIF (<EVAL <TAG.KS>> >= 25)
SERV.B @3 <NAME> is mad! Now you have to gank him to kill him.
ELSEIF (<EVAL <TAG.KS>> >= 20)
SERV.B @3 <NAME> is godlike! Someone have to kill him if its avable.
ELSEIF (<EVAL <TAG.KS>> >= 15)
SERV.B @3 <NAME> is unstoppeble! Someone kill him please.
ELSEIF (<EVAL <TAG.KS>> >= 10)
SERV.B @3 <NAME> is dominating! kill him!!!
ELSEIF (<EVAL <TAG.KS>> >= 8)
SERV.B @3 <NAME> is on a rampage! he/she is going to be a dominator if no one kill him.
ELSEIF (<EVAL <TAG.KS>> >= 5)
SERV.B @3 <NAME> is on a killing spree! someone kill him.
ENDIF
[FUNCTION f_ks_announce_death]
IF (<EVAL <TAG.KS>> >= 50)
SERV.B @025 <name> TOTAL RECALL! have been stoped by: <src.act.name>, He pawned the head of <name>!
ELSEIF (<EVAL <TAG.KS>> >= 45)
SERV.B @025 <name> RECALL ! are now pawned by: <src.act.name>!
ELSEIF (<EVAL <TAG.KS>> >= 40)
SERV.B @025 <name> wicked sick are now removed by: <src.act.name>!
ELSEIF (<EVAL <TAG.KS>> >= 35)
SERV.B @025 <NAME> realy mad! are stoped by a cheap... JK by: <src.act.name>.
ELSEIF (<EVAL <TAG.KS>> >= 25)
SERV.B @025 <NAME> mad! have been pawned by: <src.act.name>.
ELSEIF (<EVAL <TAG.KS>> >= 20)
SERV.B @025 <NAME> goooood like! have been stoped! By: <src.act.name>.
ELSEIF (<EVAL <TAG.KS>> >= 15)
SERV.B @025 <NAME> unstoppeble! is no more, thx <src.act.name>.
ELSEIF (<EVAL <TAG.KS>> >= 10)
SERV.B @025 <NAME> dominating! are broken, thx <src.act.name>.
ELSEIF (<EVAL <TAG.KS>> >= 8)
SERV.B @025 <NAME> rampage! is gone. Thx <src.act.name>.
ELSEIF (<EVAL <TAG.KS>> >= 5)
SERV.B @025 <NAME> killing spree! have been lost by: <src.act.name>.
ENDIF
//Level Menu
[DIALOG d_levelm]
0,0
page 0
resizepic 44 60 9390 316 479
text 83 105 1171 0
gumppic 82 264 7015
gumppic 82 344 7008
gumppic 82 425 7030
text 84 127 1257 1
gumppic 67 216 1143
text 163 219 1257 2
text 158 266 0 3
text 158 346 0 4
text 158 426 0 5
text 269 105 1171 6
text 160 283 1257 7
text 160 441 1257 8
text 160 362 1257 9
text 270 127 1257 10
button 161 307 5541 5542 1 0 1
button 161 466 5541 5542 1 0 2
button 161 386 5541 5542 1 0 3
text 84 193 1171 11
text 85 146 0 12
text 85 161 0 13
text 85 176 0 14
text 146 146 1257 15
text 146 161 1257 16
text 146 176 1257 17
text 245 146 0 18
text 246 177 0 19
text 294 177 1257 20
text 294 147 1257 21
[DIALOG d_levelm text]
Character Statisctics
<src.name>
<EVAL <TAG.EXP>> / <EVAL <TAG.EXPNEEDED>>
Strength
Dexterity
Intelligence
Level
<src.str>
<src.int>
<src.dex>
<EVAL <TAG.LEVEL>>
Experience
Health
Stamina
Mana
<src.maxhits>
<src.maxstam>
<src.maxmana>
Damage
Armor
<src.ar>
<src.dam>
[DIALOG d_levelm button]
ON=1
// Str increase
//
IF <src.restest i_stat_point>
src.consume=1 i_stat_point
src.str +=1
if (<src.restest 1 i_stat_point>)
src.dialog d_levelm
else
src.sysmessage @1257 You don't have any more Stat Point(s)
endif
ON=2
// Int Increase
//
IF <src.restest i_stat_point>
src.consume= 1 i_stat_point
src.int +=1
if (<src.restest 1 i_stat_point>)
src.dialog d_levelm
else
src.sysmessage @1257 You don't have any more Stat Point(s)
endif
ON=3
// Dex Increase
//
IF <src.restest i_stat_point>
src.consume= 1 i_stat_point
src.dex +=1
if (<src.restest 1 i_stat_point>)
src.dialog d_levelm
else
src.sysmessage @1257 You don't have any more Stat Point(s)
endif
[PLEVEL 1]
level
exp
f_levelup
[ITEMDEF i_stat_point]
ID=i_gem_ruby
Name=Stat Point(s)
TYPE=t_eq_script
WEIGHT=0
ON=@CREATE
ATTR=attr_invis
CoLOR=0635
Any idea?
|
|
08-16-2015 03:24 AM |
|
|
Osirirs
Journeyman
Posts: 73
Likes Given: 6
Likes Received: 4 in 2 posts
Joined: Feb 2014
Reputation: 2
|
RE: Lvl System Help
hahahaha indeed that's not a bad idea xD I'll try it.
for now I tried without the source (src) and that's what I got in my console:
Quote:
ERROR:UID=04000d0c1, id=04505 'Stat Point(s)', Invalid code=3202 (Object not placed in the world)
ERROR:UID=04000d144, id=04505 'Stat Point(s)', Invalid code=3202 (Object not placed in the world)
ERROR:UID=04000d299, id=04505 'Stat Point(s)', Invalid code=3202 (Object not placed in the world)
ERROR:UID=04000d3c5, id=04505 'Stat Point(s)', Invalid code=3202 (Object not placed in the world)
ERROR:UID=04000d51e, id=04505 'Stat Point(s)', Invalid code=3202 (Object not placed in the world)
I still get my "points" fine if I only use I manually level up. Its just when I levelup with the system.. which is the most important part
|
|
08-17-2015 11:10 AM |
|
|