Jump to content

Mumbles

Retired Staff
  • Content Count

    618
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by Mumbles


  1.  

     

    try this one

    Okey installed al working but if i click on Item Database 

     

    this error come up:

     

    Error: Flux_ErrorMessage: Failed to import/replace rows from table 'hercules.item_db2'File: /usr/www/users/oldschne/flux/lib/Flux/TemporaryTable.php:230

    I added the item_db2.sql from the hercules folder but its only the structur and no data?!

     

    Same here.

     

    This was fixed in f3eed0e. Pull or download the latest version of FluxCP and you'll be fine.


  2. Getting this error.

     

    Message: Failed to import/replace rows from table 'ragnarok.item_db2'

     

     

    Any fix? thanks

     

    Check config/servers.php and verify that the database and user information there are correct. If they are, additionally check to see if you have an SQL version of item_db2 imported into your database (Flux looks for this). You can either use a blank item_db2, or import your existing one. Read this article about db2sql to find out how to do so: http://herc.ws/wiki/index.php?title=Db2sql

     

    how to change the theme witdh to fixed ? (reduce the width)

     

    You can modify the page container in your theme's css/style.css file. Look for the ID #page and adjust settings for the container there.


  3. Moving to Script Support for the following reason:

    [*]Code-based releases must be tested and error-free on Hercules emulators.

    I made this during my break in between classes so it has NOT been tested yet. Over the next few days I'll be testing it and changing it, but for now, here is the initial release.

     

     

    I encourage you to make a new topic when your script is complete, tested, and fully functional. I have codeboxed your script below for quick referencing. Thanks for your contribution!

     

    /*==================================================Bankerby Zephy====================================================Description: A banker NPC for exchanging an item for zeny,vice versa, and storage of said item withoutusing a SQL database.====================================================Additional Notes: - Make sure you take into consideration your   input_max_value in /conf/script.conf.====================================================Changelog:	1.0 - Initial Release==================================================*/ -	script	Banker	-1,{	 mes .npc_name$;	mes "You currently have "+ #banknote +" "+ getitemname(.note_id) +"s in your account.";	mes " ";	mes "What would you like to do?";	next;		// Main Menu	switch(select("Deposit "+ getitemname(.note_id) +"s:Withdraw "+ getitemname(.note_id) +"s:Exchange "+ getitemname(.note_id) +"s:Cancel")) {		 case 1: // Deposit item			mes .npc_name$;			mes "How many "+ getitemname(.note_id) +"s would you like to deposit?";			 input @banknotedeposit; // Input amount to be stored			 if (@banknotedeposit =< 0) { // Checks if the player enters a number less than or equal to 0				 mes .npc_name$;				mes "Please enter a number greater than zero.";				close;			}			 if (@banknotedeposit > countitem(.note_id)) { // Checks if the player has item amount				 mes .npc_name$;				mes "You do not have enough "+ getitemname(.note_id) +"s.";				close;			}			 #banknote = #banknote+@banknotedeposit; // Adds amount to current storage amount			delitem .note_id,@banknotedeposit; // Deletes items						mes .npc_name$;			mes "I have deposited your "+ getitemname(.note_id) +"s.";			mes "Come again soon.";			close;		 case 2: // Withdraw item			mes .npc_anme$;			mes "How many "+ getitemname(.note_id) +"s would you like to withdraw?";			 input @banknotewithdraw; // Input amount to be withdrawn			 if (@banknotewithdraw =< 0) { // Checks if the player enters a number less than or equal to 0				 mes .npc_name$;				mes "Please enter a number greater than zero.";				close;			}			 if (@banknotewithdraw > #banknote) { // Checks if the player has enough of the item in the storage				 mes .npc_name$;				mes "You only have "+ #banknote +" "+ getitemname(.note_id) +"s in your account.";				close;			}			 #banknote = #banknote-@banknotewithdraw; // Reduces storage amount by amount withdrawn			getitem .note_id,@banknotewithdraw; // Receive item			 mes .npc_name$;			mes "I have withdrawn "+ @banknotewithdraw +" "+ getitemname(.note_id) +"s from your account.";			mes "Come again soon.";			close;		 case 3: // Exchange items			switch(select("Zeny ---> "+ getitemname(.note_id) +":"+ getitemname(.note_id) +" ---> Zeny:Back")) {				 case 1: // Zeny to item					mes .npc_name$;					mes "Please input the amount of zeny to exchange for "+ getitiemname(.note_id) +"s,";					 input @zenyexchange; // Input amount of zeny					 if (@zenyexchange < .note_price) { // Checks if amount entered is less than the set .note_price						 mes .npc_name$;						mes "The exchange rate is "+ .note_price +" zeny per "+ .note_id +".";						close;					}					 if (Zeny < @zenyexchange) { // Checks if player has enough zeny											mes .npc_name$;						mes "Please come back with more zeny or enter another value.";						close;					}					 Zeny =- @zenyexchange; // Reduces zeny by amount inputted					@pricea = @zenyexchange/.note_price; // Sets note amount					getitem .note_id,@pricea; // Gives player notes					 mes .npc_name$;					mes "I have exchanged "+ @zenyexchange +" zeny for "+ @pricea +" "+ getitemname(.note_id) +"s.";					mes "Come again soon.";					close;				 case 2: // Item to zeny					mes .npc_name$;					mes "Please input the amount of "+ getitemname(.note_id) +"s you would like to exchange for zeny.";					 input @noteexchange; // Input amount of items					 if (@noteexchange < countitem(.note_id)) { // Checks if player has enough of the item											mes .npc_name$;						mes "Please come back with more "+ getitemanme(.note_id) +" or enter another value.";						close;					}					 if ((@noteexchange*.note_price)+Zeny > @maxzeny) { // Checks if the player will reach their max zeny											mes .npc_name$;						mes "Sorry, but you can not exchange this number of "+ getitemname(.note_id) +"s ";						mes "because you will exceed the maximum amount of zeny you can hold.";						close;					}					 delitem .note_id,@noteexchange; // Deletes notes by amount inputted					@priceb = @noteexchange*.noteprice; // Sets zeny amount					Zeny =+ @priceb; // Gives player zeny										next;					 mes .npc_name$;					mes "I have exchanged "+ @noteexchange +" "+ getitemname(.note_id) +"s for "+ @priceb +" zeny.";					mes "Come again soon.";					close;				 case 3:					break;			}		 case 4: // Cancel			mes .npc_name$;			mes "Come again soon.";			close;	}	 // Configuration	OnInit:		.npc_name$ = "[^0000CCBanker^000000]"; // NPC name				.note_id = 0; // Bank note ID		.note_price = 0; // Bank note price, in zeny		.maxzeny = 2000000000; // Maximum amount of zeny a player can hold in your server} // Duplicates//===============================================================prontera,150,150,3	duplicate(Banker)	Banker#prt	4_m_khkyel

  4. The problem lies in the check made for Zeny:

            if(zenny = 1000000000)        {            getitem 674,1;                        next;            mes "[Sample]";            mes "Here is your Mithril Coin!";            set Zeny,Zeny - 1000000000;            close;        }

     

    The proper method would be to compare the character variable, Zeny:

            if(Zeny >= 1000000000)        {            getitem 674,1;                        next;            mes "[Sample]";            mes "Here is your Mithril Coin!";            set Zeny,Zeny - 1000000000;            close;        }

     

    The previous method incorrectly "checks" the character variable, zenny; additionally, a == or >= should be used to compare both sides of this expression, not =.


  5. Does this panel includes paid add-ons? Such as gametime. Hercules supported it.

     

    To my knowledge, there is currently no functionality for paid accounts with FluxCP. The most that can be done is selling some sort of voucher through the item shop, but that's not really native support for the pay-to-play functionality.


  6. I haven't tested this, but it would seem that the warp command issued with the OnPCDieEvent label. I've added a sleep2 with a 100ms pause and organised your code a bit:

     

    -	script	pvpbet	-1,{	OnPCKillEvent:		if (strcharinfo(3) != "guild_vs2-2" || killedrid == getcharid(0)) {			end;		}				if (lastkilled == killedrid){			set lkcount,lkcount+1;	 			if (lkcount >= 5){				dispbottom "You have Lose";			} else {				getitem 7179,1;				dispbottom "You have gained 1 money";			}		} else {			set lastkilled,killedrid;			set lkcount, 1;			getitem 7179, 1;			dispbottom "You have gained 1 money";		}				end;	 	OnPCDieEvent:		if (strcharinfo(3) != "guild_vs2-2") {			end;		}				dispbottom "You have Lose";		sleep2 100;		warp "Invek", 146, 164;		end;	}

     

    In the future, I recommend that you use tabs to separate your code a bit. It's difficult to read otherwise.


  7. You would add a script like this (pseudocode):

     

    switch (select("Option 1:Option 2:Option 3")) {		// Map names	setarray .@map_name$[0],	"map_name",					"map_name2",					"map_name3";		// Coordinates	setarray .@coords[0],	50, 50,				60, 60,				70, 70;		// Menu options	setarray .@options$[0],	"Option 1",				"Option 2",				"Option 3";	// Menu dialogue	menu implode(.@options$, ":"), -;	.@i = @menu - 1;	.@x = .@i * 2;	.@y = .@x + 1;		// Warp to target map		specialeffect2 EF_PORTAL	warp .@map_name$[.@i], .@coords[.@x], .@coords[.@y];	close;}

  8.  

    prontera,150,150,0	script	Sample	100,{	mes "Input your message";	next;	input .@m$;	close2;	if ( .@m$ != "" ) {		query_sql "SELECT `account_id` FROM `char` WHERE `base_level` < 20 AND `online` = '1'",.@aid;		while ( .@i < getarraysize(.@aid) ) {			if ( attachrid( .@aid[.@i] ) )				dispbottom "" + .@m$ + "";			detachrid;			.@i++;		}	}	end;}

     

    Not that it's a big deal or anything, but I'd say message would be more preferable over dispbottom; if a player has /notalkmsg2 on, they won't receive the message.

     

    Usage:

     

    message strcharinfo(0), "Some message here.";

  9. Not sure if you want precisely only ~20 people to receive a global broadcast or if you're just trying to have only a few people in your vicinity be able to see a local broadcast. In that case, you might find localbroadcast and areabroadcast to be useful.


  10. Load this script into your server and players will have their status points reset upon next login. If you have players online, just @kickall so they have to relog.

     

     

    -	script	status_reset	-1,{	 OnPCLoginEvent:		if (!status_reset) {			resetstatus;			status_reset++;		}				end;	} 
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.