Jump to content
  • 0

Race to 99 with announcer


Hatake Kakashi

Question


  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

Hello im BACK~ pioneer of rathena but i can't remember all because im old now hahaha,

can you please give me script that has a Race to 99 npc when the player reach max lvl 99 he/she needs to talk to the npc and npc will give his/her reward

and npc announce his/her name to congratulate him/her to reach lvl 99 and per account only and take note please put for 30 players only then after 30 players who reached max level then the npc will automatically gone.

 

thank you in advance.

Edited by Hatake Kakashi
Link to comment
Share on other sites

12 answers to this question

Recommended Posts

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   8
  • Joined:  05/12/20
  • Last Seen:  

MAP,X,Y,POS	script	Reward Npc::99PrizeNpc	SPRITE_ID,{
	if (BaseLevel == 99 && !(char99reward)){
		// Get prize here
		$99rewards += 1;		// Permanent global server var. Counter
		set char99reward,1;			// Permanent char var.
		announce strcharindo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left".
	}
OnInit:
	if ($99rewards > 29)
		disablenpc(strnpcinfo(3));
	end;
}

Its a very simple way of doing that. 
Even so, the best way of doing that is creating a SQL table for that purpose. 
see: 

 

Edited by buraquera
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

11 hours ago, buraquera said:

MAP,X,Y,POS	script	Reward Npc::99PrizeNpc	SPRITE_ID,{
	if (BaseLevel == 99 && !(char99reward)){
		// Get prize here
		$99rewards += 1;		// Permanent global server var. Counter
		set char99reward,1;			// Permanent char var.
		announce strcharindo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left".
	}
OnInit:
	if ($99rewards > 29)
		disablenpc(strnpcinfo(3));
	end;
}

Its a very simple way of doing that. 
Even so, the best way of doing that is creating a SQL table for that purpose. 
see: 

 

i got error sir. 

error.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

Quote

prontera,139,174,4    script    Reward Npc::99PrizeNpc    430,{
    if (BaseLevel == 99 && !(char99reward)){
        // Get prize here
        $99rewards += 1;        // Permanent global server var. Counter
        set char99reward,1;            // Permanent char var.
        announce strcharindo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left".
    }
OnInit:
    if ($99rewards > 29)
        disablenpc(strnpcinfo(3));
    end;
}

here's the script i edit. please help ty

Edited by Hatake Kakashi
nothing
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   8
  • Joined:  05/12/20
  • Last Seen:  

image.png.038171029c1bfd301ce6c7e50cdb3ffc.png
 

Purple: Whats wrong and line.
Red: Error description

This mean a syntax error. Often is a "typing error".

There are no "strcharindo" function but "strcharINFO". Also should be a ";" in the end. So:

from
 announce strcharindo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left".
to
 announce strcharinfo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left.";

Edited by buraquera
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

same error.

 

error2.png

Edited by Hatake Kakashi
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  58
  • Topics Per Day:  0.01
  • Content Count:  395
  • Reputation:   53
  • Joined:  07/24/12
  • Last Seen:  

1 hour ago, Hatake Kakashi said:

same error.

 

error2.png

announce strcharindo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left".
to
 announce strcharinfo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left.",bc_all;

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

when i click the npc it says prontera? why prontera? please i want a announce his/her name thank you.

error.png

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   8
  • Joined:  05/12/20
  • Last Seen:  

3 hours ago, Hatake Kakashi said:

when i click the npc it says prontera? why prontera? please i want a announce his/her name thank you.

error.png

on
 announce strcharinfo(3) + "has won LvL 99 reward." + (30-$99rewards) + " prizes left.",bc_all;

change: strcharinfo(3) to -> strcharinfo(0)


 

*strcharinfo(<type>{,<char_id>})
   
  This function will return either the name, party name or guild name for the
  invoking character. Whatever it returns is determined by type.
   
  0 - Character's name.
  1 - The name of the party they're in if any.
  2 - The name of the guild they're in if any.
  3 - The name of the map the character is in.
   
  If a character is not a member of any party or guild, an empty string will be
  returned when requesting that information.


You better have a read on this entire file before adding new scripts. Will help you a lot.
https://github.com/rathena/rathena/blob/master/doc/script_commands.txt

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

Quote

prontera,139,174,4    script    Race to 99 NPC    430,{
    if (BaseLevel == 99 && !(char99reward)){
        // Get prize here
        $99rewards += 1;        // Permanent global server var. Counter
        set char99reward,1;            // Permanent char var.
         announce strcharinfo(0) + " has won LvL 99 reward." + (30-$99rewards) + " prizes left.",bc_all;
    }
OnInit:
    if ($99rewards > 29)
        disablenpc(strnpcinfo(3));
    end;
}

it's now working, but please tell me where can i put the prize? thank you,.

Edited by Hatake Kakashi
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

22 hours ago, Hatake Kakashi said:

it's now working, but please tell me where can i put the prize? thank you,.

where can i put the prize on it? thank you.

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  3
  • Topics Per Day:  0.00
  • Content Count:  68
  • Reputation:   8
  • Joined:  05/12/20
  • Last Seen:  

2 hours ago, Hatake Kakashi said:

where can i put the prize on it? thank you.

above   // Get prize here lol

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  254
  • Topics Per Day:  0.06
  • Content Count:  825
  • Reputation:   3
  • Joined:  11/14/11
  • Last Seen:  

5 hours ago, buraquera said:

above   // Get prize here lol

thank you master ?

Link to comment
Share on other sites

Join the conversation

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

Guest
Answer this question...

×   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.

×
×
  • Create New...