SphereCommunity
Levelup function - Printable Version

+- SphereCommunity (https://forum.spherecommunity.net)
+-- Forum: Sphere 0.56d (/Forum-Sphere-0-56d)
+--- Forum: Script Help (/Forum-Script-Help)
+--- Thread: Levelup function (/Thread-Levelup-function)



Levelup function - Snaigel - 02-03-2017 06:13 AM

Hi, I have this level up function on my leveling script, but I dont know how to make it to place an item on the backpack of the player when they level up, tryied with serv.newitem but doesn't work[/align]

Quote:[FUNCTION f_levelup]
f_show_xp_title
IF <TAG0.EXP> >= <TAG0.LEVELUP>
SYSMESSAGE @030 ¡¡Has subido de nivel!!
TAG0.EXP=0
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 Necesitas mas experiencia para subir de nivel.
ENDIF



RE: Levelup function - Catalan_mistral - 02-03-2017 06:53 AM

Don't swear if i'm wrong but have you tried new.bounce?


RE: Levelup function - Leonidas - 02-03-2017 06:59 AM

src.newitem=i_blah
new.bounce


RE: Levelup function - Snaigel - 02-03-2017 07:28 AM

Rofl I forgot that command, thanks


RE: Levelup function - xwerswoodx - 02-03-2017 10:19 AM

SERV.NEWITEM i_item_id,amount,<SOURCE>

Example:
SERV.NEWITEM i_fx_sparkle,1,<UID>