Jump to content

Mumbles

Retired Staff
  • Content Count

    618
  • Joined

  • Last visited

  • Days Won

    15

Everything posted by Mumbles

  1. Still getting the error. Are you getting the error with a custom theme? Make sure your theme's item module is up to date with the latest changes as well.
  2. 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.
  3. 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 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.
  4. Mumbles

    Banker

    Moving to Script Support for the following reason: [*]Code-based releases must be tested and error-free on Hercules emulators. 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
  5. 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 =.
  6. 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.
  7. 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.
  8. If this is actually in your script, it's no surprise that you're getting errors from loading it: </span></p><p>
  9. Moved to General Server Support; there's a lot more here than client-side tools.
  10. Read this article on our Wiki: http://herc.ws/wiki/Db2sql
  11. The proper usage in an item script would be: callfunc "bwcycskill"; Though you could probably just write it as: bwcycskill; Also, I recommend you use constants to determine the skills you want to give. These can be found in db/const.txt
  12. Here's a full list of status changes: http://herc.ws/wiki/index.php?title=Status_List&diff=497&oldid=246
  13. Here's a more detailed list of status changes: http://herc.ws/wiki/index.php?title=Status_List&diff=497&oldid=246
  14. If you choose "mine", your version will be used and the update for that file will be ignored.
  15. Mumbles

    Warp Scroll

    It's not a source modification; it was just an example script. You would have to configure it to your liking and place it in the Script field in your item_db2.conf
  16. Mumbles

    SCRIPTS

    You might find the documentation file useful: https://github.com/HerculesWS/Hercules/blob/master/doc/script_commands.txt Additionally, you can check your scripts for compatibility here: http://haru.ws/scriptchecker/
  17. Mumbles

    Warp Scroll

    We don't use item_db2.txt anymore; we use item_db2.conf, which uses libconfig formatting. ----- Pseudocode: http://simple.wikipedia.org/wiki/Pseudocode
  18. Mumbles

    Warp Scroll

    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;}
  19. If you don't mind manually re-editing your version, make a backup copy on your computer and then choose to use "theirs" (tc).
  20. 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.";
  21. Contrary to the name, Hercules-11.sln is for VS 2012, and Hercules-12.sln is for VS 2013.
  22. Enable the zone mapflag for the desired restricted map(s) in npc/mapflag/zone.txt, then create a new zone for it in db/pre-re/map_zone_db.conf or db/re/map_zone_db.conf (depending on your server mode) with the items you want to disable.
  23. 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.
  24. Yes; if you want to do this again, run this query in your database: DELETE FROM `global_reg_value` WHERE `str` = 'status_reset';
×
×
  • Create New...

Important Information

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