/* ___ ___ ___ ___ ___ ___ ___ ___ ___ ___ ___
/\ \ /\ \ /\ \ /\__\ /\ \ /\ \ /\ \ /\ \ /\__\ /\__\ /\ \
\:\ \ /::\ \ /::\ \ /:| _|_ /::\ \ /::\ \ /::\ \ /::\ \ /:| _|_ /:/ _/_ /::\ \
/::\__\ /::\:\__\ /:/\:\__\ /::|/\__\ /:/\:\__\ /:/\:\__\ /::\:\__\ /:/\:\__\ /::|/\__\ /:/_/\__\ /\:\:\__\
/:/\/__/ \:\:\/ / \:\ \/__/ \/|::/ / \:\/:/ / \:\ \/__/ \;:::/ / \:\/:/ / \/|::/ / \:\/:/ / \:\:\/__/
\/__/ \:\/ / \:\__\ |:/ / \::/ / \:\__\ |:\/__/ \::/ / |:/ / \::/ / \::/ /
\/__/ \/__/ \/__/ \/__/ \/__/ \|__| \/__/ \/__/ \/__/ \/__/
*----------------------------------------- eAthena Script ---------------------------------------------*
* Maximum Level Announce *
*----------------------------------------------- By: --------------------------------------------------*
* TecnoCronus *
*----------------------------------------- Current Version: -------------------------------------------*
* 1.0 *
*----------------------------------------- Compatible With: -------------------------------------------*
* eAthena *
*------------------------------------------- Description: ---------------------------------------------*
* A NPC that announce the 10th firsts persons who got the maximum level *
*----------------------------------------- Additional Comments: ---------------------------------------*
* It give a item as reward, the item ids of reward are keeped at $@Glob_Array_Item array *
* The index of array will be get randomly. *
*-------------------------------------------- Changelog -----------------------------------------------*
*- http://trac.xp-dev.com/TC_Scripts/log/scripts/EN/MaxLvLAnnouncer.txt *
*------------------------------------------------------------------------------------------------------*/
- script MaxLvLAn -1,{
end;
OnPCBaseLvUpEvent:
if(.numMaxLevel == 10)
disablenpc "MaxLvLAn";
else if (BaseLevel==.MaxLvl) {
// Check if the player for some reason, reached to Maximum level again
if(Rew > 0) end;
// Keep the player name on array
setarray $Rank$[.numMaxLevel], strcharinfo(0);
announce strcharinfo(0)+", you are the "+.places$[.numMaxLevel]+" person to reach the level "+.MaxLvl+", you will receive a reward",0;
//give prize
set @Rnd_Item, rand(0,(getarraysize(".Global_Array_Item")-1));
getitem .Global_Array_Item[@Rnd_Item],1;
// set this variable, to don't take rewards again
set Rew, 1;
// Keep the last array index
set .numMaxLevel,.numMaxLevel+1;
if(.numMaxLevel == 9) // Should be 9 now because the array index start in 0 (Thanks to ToastOfDoom)
disablenpc "MaxLvLAn";
}
end;
OnInit:
// Set here the maximum level of your server
set .MaxLvl, 160;
// Array with the item id rewards
setarray .Global_Array_Item[0],20288,20006;
//array lookup for place names
setarray .places$[0], "First", "Second", "Third", "Fourth", "Fifth", "Sixth", "Seventh", "Eighth", "Ninth", "Tenth";
}
prontera,164,98,4 script MaxLvLRank 833,{
mes "[Constantin]";
mes "Hello, I'm Constantin, I'm the person";
mes "Who have access to all the Rune Midgard Registries";
mes "Are you interested in something ?";
next;
if(select("I want see the Top Level Ranking: No, Nothing.")==1) {
mes "[Constantin]";
mes "This rank shows the first 10 people who reached the";
mes "Maximum Level.";
next;
mes "[Constantin]";
for(set @i, 0; $Rank$[@i]; set @i, @i + 1) mes @i+"º"+$Rank$[@i]+".";
} else {
mes "[Constantin]";
mes "Ok, have a nice day.";
}
close;
}
and I want this getting work with rAthena
When someone reaches Level 160, my mapserver gives this error:
[Warning]: Unexpected type for argument 1. Expected variable, got C_CONSTSTR. [Debug]: Data: string value=".Global_Array_Item" [Debug]: Function: getarraysize [Debug]: Source (NPC): MaxLvLAn (invisible/not on a map) [Error]: script:getarraysize: not a variable [Debug]: Data: string value=".Global_Array_Item" [Debug]: Source (NPC): MaxLvLAn (invisible/not on a map)
and when I click through the npc, this "error" appears:
[Warning]: Unexpected type for argument 1. Expected number. [Debug]: Data: variable name='$Rank$' index=0 [Debug]: Function: jump_zero [Debug]: Source (NPC): MaxLvLRank at prontera (164,98)
Question
leertaste
I'v got this script:
and I want this getting work with rAthena
When someone reaches Level 160, my mapserver gives this error:
and when I click through the npc, this "error" appears:
help pleaaaase
Link to comment
Share on other sites
5 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.