Jump to content


Member Since 12 Jun 2014
Offline Last Active Yesterday, 08:40 PM

#82056 Charity NPC - Help pls

Posted by Ridley on 27 April 2017 - 06:42 PM

Select Code
//Charity NPC//

izlude,124,139,6	script	Lucy	101,{

// Variables
	.@n$ = "[Lucy]";
//	$donate5m = 5000000; // you used global account variables, but you need global variable here ($)
//	$donate10m = 10000000; // if you do it like this, those variables will be set each time someone talks to the npc.
//	$donate15m = 15000000;
//	$donate25m = 25000000; // i kept em but they're totally not needed

/*// Zeny Detector  // this would prevent anyone to do anything
	if (Zeny < $donate5m) {
		mes .@n$;
		mes "Sorry, you dont have enough money to talk to me.";
		mes "You need to have atleast ^FF00005,000,000z^000000.";
		mes "The total amount I collected is : ^0000CD["+$totaldonate+"]^000000 zeny.";
// Start
	mes .@n$;
	mes "Hello, Citizen of Ragnarok Offline.";
	mes "Can I help you with something?";
	if (select("Yes, I would like to donate", "No, Thank you") ==2) { // removed the switch here, instead, if you select the 2nd answer the npc will directly end.
		mes .@n$;										// Also you had close; end; in your script, which is not needed.
		mes "Okay then. See you later.";
	mes .@n$;
	mes "I was assigned by the ^DAA520 GM Team^000000 to collect the donation money.";
	mes "The total amount I collected is : ^0000CD["+$totaldonate+"]^000000 zeny.";
	mes .@n$;
	mes "You can only donate 1,000,000z or 5,000,000z.";
	mes .@n$;
	mes "If I collected a total amount of ^FF000075,000,000^000000z.";
	mes "I can activate this event:";
	mes "Event: ^8B008BComodo Hat Festival Quest^000000.";
	mes "Event Duration: ^006400[2 DAYS]^000000.";
	mes .@n$;
	mes "How much money you want to donate?";
	mes "Once you donate, I can't your money back.";
	.@menu = select("5,000,000z", "10,000,000z", "15,000,000z", "25,000,000z"); // removing the switch, instead we store selection in a variable (1-4 depending on selection)
	setarray(.@costs[0] = 5000000, 10000000, 15000000, 25000000); // setting a temporary array with the costs)
	switch (.@menu) { //switching the variable we set before
	case 1:
	case 2:
	case 3:
	case 4:
		mes .@n$;						// same message, regardless how much you donated
		if (Zeny < .@costs[.@menu-1]) {	// you forgot a Zeny check so I added one
			mes .@n$;
			mes "You don't have enough Zeny?";
		Zeny -= .@costs[.@menu-1];				// zeny -= the costs you selected (arrays start at 0, so its your selection -1)

		$totaldonate += .@costs[.@menu-1]; // variable += the donated amount
		mes "Thank you for donating "+.@costs[.@menu-1]+"!"; //
		mes "We appreciate your generosity.";
		announce "[Charity Lucy: "+strcharinfo(0)+"] has donated ["+.@costs[.@menu-1]+"] to Charity! We appreciate your generosity.", 0;
		mes .@n$;
		mes "The total amount I collected is : ^0000CD["+$totaldonate+"]^000000 zeny.";
	} // closing the switch
} // closing npc


i did some comments inside - everything is untested
to enable npcs depending on donated amount you can either use a fake_npc and check for $totaldonate > 25m or whatever, or you do like in rachel quest

//== Donation Lottery Quest/High Priest Quest :: rachel_oz & rachel_ma1 =
ra_temple,119,180,0	script	Temple Entrance#ra_tem	WARPNPC,1,1,{
	if ($rachel_donate >= 10000) {
		if (MISC_QUEST & 8192) { warp "ra_temin",169,23; end; }

		if (ra_tem_q < 10) {
			mes "^3355FFThe temple's";
			mes "entrance is locked.^000000";
			select("Kick Door.", "Smash Door with Weapon.");
			emotion e_omg,0,"Nemma#ra_temple";
			mes "[Priestess Nemma]";
			mes "Please don't do that!";
	warp "ra_temin",169,23;

#81875 Users with Nvidia GTX cards

Posted by Ridley on 20 April 2017 - 09:21 PM

Thats why I said to try to disable lightmaps. But anyways, why do you expect 5 year old (or older) clients to work with modern hardware?

#81841 How to allow one ip use on an NPC

Posted by Ridley on 19 April 2017 - 04:31 PM

*getcharip({"<character name>"|<account id>|<char id>})

This function will return the IP address of the invoking character, or, if 
a player is specified, of that character. A blank string is returned if no 
player is attached.


// Outputs IP address of attached player.
    mes("Your IP: " + getcharip());

// Outputs IP address of character "Silver".
    mes("Silver's IP: " + getcharip("Silver"));

#81545 <NAVI> and <URL>

Posted by Ridley on 07 April 2017 - 01:39 PM

It's in /data/luafiles514/lua files/navigation/

Here you can see my commit where I added support for iz_int

#81228 Clan System

Posted by Ridley on 23 March 2017 - 11:20 AM

There was no update here for quite a while, but clans is actually ready and full configurable. You can set an inactivity timer, buffs and also add custom clans. Adel made a small image pack for a custom clan (which I attach upon the release).
There is some last testing and then we show it to Haru and hope for a quick merge. Afterwards I do a topic about how everything works.

#81158 Error Old Payon ad Morroc

Posted by Ridley on 19 March 2017 - 09:46 PM

Don't simply rename maps. You need to "save as" in browedit

#81080 How to add custom @commands in group.conf

Posted by Ridley on 14 March 2017 - 06:20 AM

There is a plugin to show custom commands in @commands, and a pull request to add it by default.

#81024 Rand item with setarray amount

Posted by Ridley on 11 March 2017 - 08:49 AM

Start the arrays at [0] not [1] or [2]
It look like you want one array for items, and another one for amount? Your problem is, reading out the array size while you actually want its values.
And yes, you Basically give a random item out of a random array. May take a look here:

#80852 R> How to squash commits on GitHub?

Posted by Ridley on 01 March 2017 - 09:49 PM

another issue was here


fixup 285e1fc Adds a protection to 1st Barricade line on WoE SE maps to avoid splash damage without destroying Guardian Stones previously.
pick 9450be2 Arrays improvement. Thanks Emistry!

where it should be


pick 285e1fc Adds a protection to 1st Barricade line on WoE SE maps to avoid splash damage without destroying Guardian Stones previously.
fixup 9450be2 Arrays improvement. Thanks Emistry!

fixup = squash without message


and yes, thhen :wq and git push -f

#80840 Hercules vs rAthena: Current differences

Posted by Ridley on 01 March 2017 - 06:21 PM

I assume you want to go for pre-re. I think both emulators have some issues with pre re so I don't see much of a difference here (but I'm honestly no pre renewal player and don't know the exact differences) . Else content wise for renewal rA is ahead.
As stated here, Herc works a lot more efficient and is cleaner. But it's biggest advantage is of course the plugin feature which basically works like an import folder for source code.
The mana world is running Hercules with a plugin on steroids, so you can see with plugins you basically can build a whole new game around the emulator.

#80826 Verus maps (NPC's & Monsters)

Posted by Ridley on 01 March 2017 - 03:57 PM

Just saying I got this (and most up to episode 16) already done and waiting for some other pr's to be merged to make it as official. I can't tell exactly when I go to do the pr's, I also plan to do a server where I can test first. But I can assure you everything I do will go to Herc.

#80754 Update/Overwrite New Thor Patcher

Posted by Ridley on 27 February 2017 - 01:03 PM

this is right in the main.ini 


//use CheckSum tool, hash for client & patcher
// used to make sure exe is up to date
//  (leave empty to disable this feature)

//This is compressed file for patcher & client update
// To make these work, ClientSum and/or PatcherSum can't be empty
// Note: these files should put same place as patch file (file_url in internal config)
//Relative address, not FULL URL!

// _sum - checksum, use CheckSum tool.
// _Name - Filename of exe
// _Path - Path for file [Compressed]

#80721 Adel's Sprite Showcase

Posted by Ridley on 26 February 2017 - 03:15 PM

Stunning as always Adel. I specially love everything related to the extended Poring family. 

#80655 How to use string as a value in script?

Posted by Ridley on 23 February 2017 - 10:37 AM

i am not exactly sure what are you trying to do. About strings 

setarray(.@type$[0], "Whatever", "Words", "Going ", "Here"); 

strings you use for words and letters, for items you want an array, but not a string

setarray(.@item[0], 501, 502, 503); 

but for items, you can also use it's aegis name (constant)

setarray(.@item[0], Red_Potion, Orange_Potion, Yellow_Potion);  

this would call the related id, so even tho using the names here, it is still considered variables.
To say it simple: strings = words, variables = numbers
about your script:

setarray [email protected],501,502,503,504,505;
setarray [email protected],506,507,508,509,511; 

You store it as a global, temporary variable, which isn't needed at all here. Neither it is required to call it oninit, better call it when it is actually needed. I would do it when that part of the script is called.


}else ;

this is... well.. remove it

 set .@randType$, "[email protected]";

this is your actual problem. Your setting a string to a variable, also it's not specified which value of the array should be called. I think you want people to get 1 item out of 1 of those 2 random groups? There is actually no need to store them in arrays, i thin F_Rand comes in hany here


prontera,50,50,3	script	seller	50,{
	.@i = rand(1) // sets .@i randomly to either 0 or 1
	if (.@i)
		getitem(callfunc("F_Rand", Red_Potion, Orange_Potion, 503)); // if .@i has a value get 1 random item, you can use constants or ID's
		getitem(callfunc("F_Rand", Green_Potion, Red_Herb, 508 )); // and these if .@i is 0


This would pretty much do what you want. Note: Even i use constants here for item id's, these are still considered variables (id's)


Now back to your question regarding strings.

.@i$ = "This is a string"; 

or in an array

setarray(.@i$[0], "We", "are", "all", "strings"); 

in an array you can store several informations, strings or variables. 


note: in an array, the index starts at 0, not at 1, this means

.@i$[0] = We

.@i$[1] = are

.@i$[2] = all

.@i$[3] = strings


you can also return the whole array like

implode(.@i$, " "); //this retuns all entries of the array, so its "We are all strings"

Pick a random string

.@i$[rand(3)] // because index starts at 0, and rand(3) means random 0, 1, 2, or 3 


Note: i use .@ as temporal npc variables, this means they got deleted again once the npc finished and you don't waste memory to perm save it

Note 2: .@i$ is just an example, you can use any name you want for your strings or variables


about name of items, you can use getitemname. This works either with the ID or with the constant

getitemname(501) or getitemname(Red_Potion), you can also youe it for your arrays


setarray(.@items[0], Red_Potion, Yellow Potion, Orange Potion);
.@r = rand(2); // .@r is either 0, 1, or 2
getitem(.@items[.@r]), 1; // you get your item from the array
mesf("Congratiulations, you got a %s", getitemname(.@r)); //it receives the name of the item

mesf is how we use it if you want do it with huld, you put %s as a placeholder for strings, %d as placeholder for variables, then after the comma you call them. If you want to do it the old way, you do


mes("Congratulations, you got a "+getitemname(.@r)+""); 


same applies for arrays with variables, so if you really want to store them


setarray .@items[0], 501, 502, 503, 504, 505; // .@items[0] is 501 and .@items [4] is 505
getitem .@items[rand(4], 1; // random item 0, 1, 2, 3 or 4 

.@items[rand(4)] // because index starts at 0, and rand(3) means random 0, 1, 2, or 3 

#80633 "New Reborn" integrated job master

Posted by Ridley on 22 February 2017 - 04:01 PM

File Name: "New Reborn" integrated job master
File Submitter: Ridley
File Submitted: 22 Feb 2017
File Category: Utility

I did this a while ago. In order to use this script you need Olrox new_reborn map

This script is no physical job changer. instead each spike of the star shaped map represents a path of the classes. You walk up there to change your job. Extended Job's are available from a normal npc in the middle.

Important: This script uses Euphys default herc job changer as a base.

- the script gives out a +7 novi weapon for each of the base classes (check line 355 to 392)
- it has some fancy warp portals, feel free to edit it to default
- even more fancy, ressource eating rotating waiting rooms for exit and entrance (default prontera) which can be disabled as well (line 502 and 530)
- autobuff inc agi +10 for 1 minute each time you walk directly through the middle (or spawn)
- you can NOT skip rebirth. 1st job -> 2nd -> rebirth -> trans ->3rd
- it also has support for rebellion, but rebellion is not yet added on herc so you might want to disable it

This script was already tested live and worked fine. I did some edits tho but never optimized it since I lost interest in it. However, I think its something different from default Job Masters

Note: I really recommend to read through it and check for all options.

Some Screenshots

Click here to download this file