Jump to content

LithiumFire

Members
  • Posts

    28
  • Joined

  • Last visited

Posts posted by LithiumFire

  1. you didn't do anything wrong ...

    why ? because Emistry script isn't working ...

    try this, full complete script

    function	script	timeleft__	{
    	if ( ( .@left = getarg(0) ) <= 0 ) return getarg(0);
    	.@day = .@left / 86400;
    	.@hour = .@left % 86400 / 3600;
    	.@min = .@left % 3600 / 60;
    	.@sec = .@left % 60;
    	if ( .@day )
    		return .@day +" day "+ .@hour +" hour";
    	else if ( .@hour )
    		return .@hour +" hour "+ .@min +" min";
    	else if ( .@min )
    		return .@min +" min "+ .@sec +" sec";
    	else
    		return .@sec +" sec";
    }
    
    -	shop	vipshop#7	-1,501:100
    -	shop	vipshop#30	-1,501:100
    
    -	script	vipnpc	FAKE_NPC,{
    OnInit:
    	bindatcmd "vipshop", strnpcinfo(0)+"::Onvipshop";
    	end;
    Onvipshop:
    	if ( #vipshop == 1 ) callshop "vipshop#7", 1;
    	else if ( #vipshop == 2 ) callshop "vipshop#30", 1;
    	else {
    		mes "which vip status do you want to buy ?";
    		mes "vip 7 days = 10 Cash points";
    		mes "vip 30 days = 20 Cash points";
    		next;
    		if ( select ( "Vip 7 Days", "Vip 30 Days" ) == 1 ) {
    			if ( #CASHPOINTS < 10 ) {
    				mes "you don't have enough Cash points";
    				close;
    			}
    			mes "Thanks for purchasing !";
    			#vipshop = 1;
    			#CASHPOINTS -= 10;
    			addtimer 7*24*60*60*1000, strnpcinfo(0)+"::OnTimeUp";
    			#viptimeleft = 7*24*60*60 + gettimetick(2);
    			close;
    		}
    		else {
    			if ( #CASHPOINTS < 20 ) {
    				mes "you don't have enough Cash points";
    				close;
    			}
    			mes "Thanks for purchasing !";
    			#vipshop = 2;
    			#CASHPOINTS -= 20;
    		//	addtimer 30*24*60*60*1000, strnpcinfo(0)+"::OnTimeUp"; // over integer limit
    			#viptimeleft = 30*24*60*60 + gettimetick(2);
    			close;
    		}
    	}
    	dispbottom "You currently have "+ #CASHPOINTS +" Cash points .Expire in "+ callfunc( "timeleft__", #viptimeleft - gettimetick(2) )+".";
    	end;
    OnPCLoginEvent:
    	if ( #viptimeleft < gettimetick(2) )
    		addtimer 1, strnpcinfo(0)+"::OnTimeUp"; // sometimes doevent doesn't work
    	else if ( #viptimeleft - gettimetick(2) < 2147483 ) // don't execute addtimer if over integer limit
    		addtimer ( #viptimeleft - gettimetick(2) )*1000, strnpcinfo(0)+"::OnTimeUp";
    	end;
    OnTimeUp:
    	#viptimeleft = #vipshop = 0;
    	end;
    }
    
    -	script	vipnpc#7	FAKE_NPC,{
    OnInit:
    	function    addshopitem    {
    		npcshopdelitem "vipshop#7", 501;
    		.@count = getargcount();
    		for ( .@i = 0; .@i < .@count; .@i++ ) {
    			if ( .@i % 2 == 0 )
    				.itemid[ .@i /2 ] = getarg( .@i );
    			else {
    				.itemcost[ .@i /2 ] = getarg( .@i );
    				npcshopadditem "vipshop#7", .itemid[ .@i /2 ], .itemcost[ .@i /2 ];
    			}
    		}
    	}
       addshopitem // adds shop items here for vip#7
            501,10,
            502,20,
            503,30,
            504,40,
            505,50;
    	npcshopattach "vipshop#7";
    	.@itemsize = getarraysize( .itemid );
    	for ( .@i = 0; .@i < .@itemsize; .@i++ )
    		.itemcost[ .itemid[.@i] ] = .itemcost[.@i];
    	end;
    OnBuyItem:
    	if ( !@bought_quantity ) end;
    	.@size = getarraysize( @bought_nameid );
    	for ( .@i = 0; .@i < .@size; .@i++ )
    		.@itemcost += .itemcost[ @bought_nameid[.@i] ] * @bought_quantity[.@i];
    	if ( .@itemcost > #CASHPOINTS ) {
    		mes "you don't have enough Cash points";
    		close;
    	}
    	if ( !checkweight2( @bought_nameid, @bought_quantity ) ) {
    		mes "you can't carry all these items !";
    		close;
    	}
    	#CASHPOINTS -= .@itemcost;
    	for ( .@i = 0; .@i < .@size; .@i++ )
    		getitem @bought_nameid[.@i], @bought_quantity[.@i];
    	end;
    }
    
    -	script	vipnpc#30	FAKE_NPC,{
    OnInit:
    	function    addshopitem    {
    		npcshopdelitem "vipshop#30", 501;
    		.@count = getargcount();
    		for ( .@i = 0; .@i < .@count; .@i++ ) {
    			if ( .@i % 2 == 0 )
    				.itemid[ .@i /2 ] = getarg( .@i );
    			else {
    				.itemcost[ .@i /2 ] = getarg( .@i );
    				npcshopadditem "vipshop#30", .itemid[ .@i /2 ], .itemcost[ .@i /2 ];
    			}
    		}
    	}
       addshopitem // adds shop items here for vip#30
            501,5,
            502,10,
            503,15,
            504,20,
            505,25;
    	npcshopattach "vipshop#30";
    	.@itemsize = getarraysize( .itemid );
    	for ( .@i = 0; .@i < .@itemsize; .@i++ )
    		.itemcost[ .itemid[.@i] ] = .itemcost[.@i];
    	end;
    OnBuyItem:
    	if ( !@bought_quantity ) end;
    	.@size = getarraysize( @bought_nameid );
    	for ( .@i = 0; .@i < .@size; .@i++ )
    		.@itemcost += .itemcost[ @bought_nameid[.@i] ] * @bought_quantity[.@i];
    	if ( .@itemcost > #CASHPOINTS ) {
    		mes "you don't have enough Cash points";
    		close;
    	}
    	if ( !checkweight2( @bought_nameid, @bought_quantity ) ) {
    		mes "you can't carry all these items !";
    		close;
    	}
    	#CASHPOINTS -= .@itemcost;
    	for ( .@i = 0; .@i < .@size; .@i++ )
    		getitem @bought_nameid[.@i], @bought_quantity[.@i];
    	end;
    }

    All right, thank you! I'll test it!

  2. Hello everyone,

     

    I would like a VIP time shop that charges cash points. I think it's pretty straightforward.

     

    To make things a lot simplier, it should only make players chonce among two options of VIP time:

    • 7 days
    • 30 days

    The Cashpoint cost should be configurable for each option (variables probably) something like:

     

    var7days = 10; // <-- 10 would be Cash points

    var30days = 20;

     

    Very important: On insufficient cashpoints: Display an error message and don't give the VIP time of course.

     

     

    The look and location of the NPC doesn't matter, I can change this later.

     

    It would be nice also, if this NPC could be bound to certain atCommand, e.g. "@vipshop"

     

    Thanks a lot in advance.

    Greetings!

  3. Cash Manager lets you easily add or modify your user's cashpoints even when they're offline and from outside the Ragnarok Client, even remotely!

     

    Instructions:

    • Unpack both files (the exe and the dll) in the same folder. Password is: 01220640
    • Open up the program and go to Settings. Fill the fields with your server's database connection settings. Click Save and restart the program.
    • Click the "Load Accounts" button and, if you filled the settings correctly, it will load all your accounts with their respective cashpoints. (While loading the program may hang a little depending on how many accounts you have and internet connection speed on yours and server's side.
    • To find a specific account just start typing the account name on the Filter / Search field.
    • To select an account and edit its cashpoints amount just double click on the desired account's row, edit the "Balance" field and click Save.

    Future revisions will include a "Search account by character name" and a Progress bar when loading the accounts.

     

    Screenshots:

    cashmgr02.png

     

    cashmgr04.png

     

    Any comments and suggestions below.

    Password for extraction is: 01220640

     

    Need a program? e-Mail me

    CashManager_1.0.0.rar

    • Upvote 1
  4. Hello,

     

    So, looking through the config files, the VIP item rate increase is "explained" this way:

     

    // Note: 50 = 0.5%

    My question is: is this percentage Absolute? or is it Relative to the current item drop rate?

     

    In other words:

     

    My item drop rate is 6x so let's take a Coat[1] from a Seal with a 0.05% drop rate for example

     

    At 6x its drop rate will be 0.30%.

     

    Now I set the VIP Item drop rate increase to 50, which is 0.5%

     

    Will this increase the Coat's drop rate to 0.80%? (Since 0.30 + 0.50 = 0.80)

     

    Or will it increase to 0.3015%? (Since 0.30 + 0.50% = 0.3015)

     

    Which will it be?

     

    Thanks in advance for clarifying this.

     
  5. Thanks.

     

    There's a bug on the Weapon Level field, when you select Level 0, it will input "0 - (No weap)" into the code instead of just "0". I will fix this as soon as possible, in the meantime you can always change this manually. Once I fix it I could start with a Monster Generator app of course.

     

    PS. Make sure to read the manual ;)

  6. ItemGen - An item code generator for rAthena

     

    Just fill all the fields with item parameters, click a button and you get your code. You can even make it add the item to the item_db.txt or item_db2.txt file directly!

     

    This is my first tool release, it's in a beta stage so I'm expecting lots of bug reports that I will gladly read and try to fix as soon as possible.

     

    All you need to know is in the manual included in the compressed package. Just un7zip it in a folder and start creating items.

     

    .NET Framework 4.5 is required.

     

    Hope many people find this useful.

     

    Greetings.

     

    itemGenshot.png

     

     

    itemGen_0.1.0_beta.7z

    • Upvote 1
  7. Is getitem2 working on item scripts?

     

    I've been following this guide to create a box that will give the players some items. I've even looked for a sample from the item_db.txt file with no luck

     

    For starters and testing I wrote a Refined Adventurer's Suit with an embedded Pupa Card but it's not working, the box does nothing.

     

    This is the code.

    30000,Start_Pack,Start Pack,18,20,,10,,,,,0xFFFFFFFF,63,2,,,,,,{ getitem2 2306,1,1,5,0,4003,0,0,0,0; },{},{}

    Am I doing something wrong? or getitem2 is just not supported by item scripts?

    If this is the case, is there any other way I could accomplish this? I really need the player to get items this way, with embedded cards and stuff.

     

    Thanks in advance

     

  8. it's not a bug.

    it's basically same like how you got db/re/item_db.txt and db/import-tmpl/item_db.txtin  your server.

    The thing is I'm getting this error when I try to access the store in FluxCP because I didn't load the pre-re item database sql file thinking that I wouln't have use for it since I'm setting up a renewal server.

    Critical Error
    
    An error was encountered during the lifetime of the application.
    
    This could be due to a variety of problems, such as a bug in the application.
    
    However, normally it is caused by misconfiguration.
    
    Exception Details
    
    Error: Flux_Error
    
    Message: Failed to import/replace rows from table '******.item_db2'
    
    File: F:\XAMPP\htdocs\flux\lib\Flux\TemporaryTable.php:230
    

     I'm just worried the store could display Pre-Re item descriptions. In this case players wouldn't be getting what they're paying for, they will get Renewal items.

  9. FluxCP tryes to load item_db2 table regardless server is Renewal or not.

     

    This is the code in /lib/Flux/ItemShop.php in the attached screenshot.

     

    Don't know if this is the right place to report this.

     

     

    post-6855-0-26724500-1426799568_thumb.png

  10. Greetings,

     

    I've failed to find any 2015 ragexe out there, I've thoroughly search this and other forums without success. Now my question is... do I actually need a 2015 ragexe in order to play with a 2015 updated client?

     

    I'm setting up a Renewal server and I intend to keep it as updated as possible (episode, monsters and items), but maybe the lack of 2015 ragexes is probably because there's no need for it.

     

    Am I right? Will a 2013 or even a 2012 ragexe work just fine? Advice will be greatly appreciated.

  11. I don't know what your reading, but to me that says, the ' indivisual ' who uses the command will enable/disable PK mode for themselves. Thus, effectively, making themselves invulnerable/unable to attack others(when off) and vulnerable/able to attack others(when on).

    But, i mean don't take my word for it, all i did was read the entire topic, and the other topic linked inside...

    Oh I'm embarrased... I never noticed it was a link. I thought it was only a highlighted text. I'll take a look at it, sorry.

    I just took a look at the link you posted, GmOcean,

    Isn't that command exploitable? Lets say, if a player is being attacked, he could use the command to protect himself anytime. I'd like to avoid that kind of abuse.

    Players should only use it for hunting monsters, I'm thinking of a way this could be accomplished...

  12. Sounds fine, just some questions.

    1. Wouldn't be this a little heavy for a server with many players? I mean, it would be a query for every single kill event, and the server is meant to be a 24-hour player killing madness (or at least it's my vision of the server).

    2. Nightmare flag seems to make you drop any item in your inventory -correct me if I'm wrong-. Players could exploit this by stuffing their inventories with loads of rubbish. I need them to drop only equipment and weapons,

    3. I suppose this would require the creation of a custom command in the source.

    4. I was trying to avoid a hard modification to the database but... if there's nothing else... it could be ok.

  13. I've searched a while with the help of google without much luck. I'm thinking about setting up a PK server with some not-very-common features like:

    • Getting experience from killed players on PK mode (not PVP) (The higher the level of the player killed, the higher the experience)
    • A chance for players to obtain one piece of equipment/weapon from the player they killed (percentage customizable). (Not duping, it would delete the item from the killed player's inventory and add it to the killer's inventory).
    • A protection command in case players want to hunt some monsters in search for equipment and money. This command would also prevent them from attacking others of course.
    • Experience from monsters completely disabled, the only way of leveling up would be killing players.

    I think most of those changes (if not all) require source modifications. May I get some help with these? Maybe there are already source projects that accomplish any of those customizations, I'd like to know about them.

    Thanks in advance.

  14. I'm getting this error when trying to register an account with JayPee's Facebook registration plugin for FluxCP:

    Unable to load the registration form for RankersRO. You may have previously blocked this app on Facebook. Go to your Facebook privacy settings to unblock this app. (Error: That 'redirect_uri' isn't allowed for that client_id.)

    This is my facebook app config:

    App Domains: rankersro.com

    Site URL: I have tried both: http://rankersro.com/panel/ and http://rankersro.com...k&action=create

    Get the same error with both of them, I need some clues, can't get this to work. I'm using asurahosting serve for fluxcp with a domain (rankersro.com)

    Greetings, thanks in advance.

  15. Get it, change of plans then. I'll host the database in the same asurahosting VPS, but I'm going to use a webhosting service for the website and Control Panel.

    Any good webhosting service (with no issues connecting to a remote database) you can recommend me? I've had problems with hosting services that don't allow connections to remote databases and I need this for the control panel obviously.

    Thanks in advance.

  16. Relevant data:

    Using 2012-06-18aRagexeRE

    Patched with Shins Diff Patcher using the Wee Diff Generator feature.

    Double click on patched RagexeRE, and nothing apparently happens. Open up task manager and see the client runnning in processes but I can't see it anywhere on the screen.

    What could be wrong?

    Further relevant data:

    Using Alexandria's Basic Complete Renewal Data English Folder on Dharien's 2012-06-02 kRO Client

    Many thanks in advance.

  17. I think it would be sweet that we could have HP/Life bars for monsters. Not all of course, that would be ugly, but it should be something that we could configure like this:

    // Displays life bars on the specified type of monsters
    // 0: Disabled
    // 1: Display life bar for normal monsters
    // 2: Display life bar for boss monsters
    // 4: Display life bar for MVP monsters
    show_mob_bar: 4
    

    Is this possible without client-side modifications? I really hope so.

    Personally I would use it only for MVP's since it would be pointless to use it with every monster, besides I think it would be a large load for client.

×
×
  • Create New...