Jump to content

Recommended Posts

Posted (edited)

File Name: LevelUpBox

File Submitter: WhiteEagle

File Submitted: 16 Nov 2012

File Category: Utilities

Content Author: WhiteEagle

A short and simple script named "LevelUpBox".

Easy to change the item which will gain the player by:

set .@item$,501;	// Level 1 with Item "Red Potion";

Function:

Every 10 level-up the player will gain an item.

Click here to download this file

Edited by WhiteEagle
Posted

This script can be rewritten as:

OnPCBaseLvUpEvent:
   setarray .@item[0],501,501,501,501,501,501,501,501,501,501,501,501,501,501,501;
   if (!(BaseLevel%10)) getitem .@item[(BaseLevel/10)-1];
   end;

  • Upvote 1
Posted (edited)

Darnit Eurphy, you were faster than I was.(didn't notice your post, thought it wasn't brought up.).

Indeed can be a lot smaller(keep comments intact, and special effects intact.) can do the special effects with a loop aswell :P. Also you were using string Variables ($ at the end), which does not apply, as you were using ID's.

// ============== Credit =====================
// Scripted by WhiteEagle
// =============== For =======================
// Delphin Project
// ===========================================

-	script	Levelupbox	-1,{

OnPCBaseLvUpEvent:
setarray .@item[0],501,	// Level 10 with Item "Red Potion";
501,	// Level 20 with Item "Red Potion";
501,	// Level 30 with Item "Red Potion";
501,	// Level 40 with Item "Red Potion";
501,	// Level 50 with Item "Red Potion";
501,	// Level 60 with Item "Red Potion";
501,	// Level 70 with Item "Red Potion";
501,	// Level 80 with Item "Red Potion";
501,	// Level 90 with Item "Red Potion";
501,	// Level 100 with Item "Red Potion";
501,	// Level 110 with Item "Red Potion";
501,	// Level 120 with Item "Red Potion";
501,	// Level 130 with Item "Red Potion";
501,	// Level 140 with Item "Red Potion";
501;	// Level 150 with Item "Red Potion";

if(!(Baselevel%10)) End;
For(set .@i,71; .@i < 73; set .@i,.@i++) specialeffect2 .@i;
getitem .@item[(BaseLevel/10)-1],1;
dispbottom "Congratulation "+strcharinfo(0)+" to level "+BaseLevel+"!";
end;
}

Edited by garet999
  • Upvote 1
  • 1 month later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...