diff options
author | AnnieRuru <jeankof@ymail.com> | 2014-03-21 04:55:31 +0800 |
---|---|---|
committer | AnnieRuru <jeankof@ymail.com> | 2014-03-21 04:55:31 +0800 |
commit | 4e73bda7d56db627d98608ba7b12711568766b79 (patch) | |
tree | acf15aceeb1ed22036fdcd4c2a491fd13cd9f30f | |
parent | a80bfc15cf01d55c556ee2924349511096bd4467 (diff) | |
download | hercules-4e73bda7d56db627d98608ba7b12711568766b79.tar.gz hercules-4e73bda7d56db627d98608ba7b12711568766b79.tar.bz2 hercules-4e73bda7d56db627d98608ba7b12711568766b79.tar.xz hercules-4e73bda7d56db627d98608ba7b12711568766b79.zip |
Fix hunting mission and clarify weight's unit
Fix hunting mission not able to take mission after a character has deleted
http://hercules.ws/board/tracker/issue-8104-hunting-missiontxt-delete-character/
Clarify Weight and MaxWeight unit as in 0.1
http://hercules.ws/board/tracker/issue-7836-weight-and-maxweight/
-rw-r--r-- | doc/item_db.txt | 2 | ||||
-rw-r--r-- | doc/script_commands.txt | 7 | ||||
-rw-r--r-- | npc/custom/quests/hunting_missions.txt | 9 |
3 files changed, 14 insertions, 4 deletions
diff --git a/doc/item_db.txt b/doc/item_db.txt index 30aa845f3..7035ed684 100644 --- a/doc/item_db.txt +++ b/doc/item_db.txt @@ -18,7 +18,7 @@ item_db: ( Type: Item Type (int, defaults to 3 = etc item) Buy: Buy Price (int, defaults to Sell * 2) Sell: Sell Price (int, defaults to Buy / 2) - Weight: Item Weight (int, defaults to 0) + Weight: Item Weight (int, defaults to 0, units in Weight/10 ) Atk: Attack (int, defaults to 0) Matk: Magical Attack (int, defaults to 0, ignored in pre-re) Def: Defense (int, defaults to 0) diff --git a/doc/script_commands.txt b/doc/script_commands.txt index d1175413e..767aa5459 100644 --- a/doc/script_commands.txt +++ b/doc/script_commands.txt @@ -522,7 +522,9 @@ JobExp - Amount of job experience points. NextBaseExp - Amount of base experience points needed to reach next level. NextJobExp - Amount of job experience points needed to reach next level. Weight - Amount of weight the character currently carries. + Display as in Weight/10. MaxWeight - Maximum weight the character can carry. + Display as in MaxWeight/10. Sex - 0 if female, 1 if male. Class - Character's job. Upper - 0 if the character is normal class, 1 if advanced, 2 if baby. @@ -2376,6 +2378,11 @@ You can also use this command to get stat values. if (readparam(bVit) > 77) mes "Only people with over 77 Vit are reading this!"; +Example 3: + + // Display your current weight + mes "Your current weight is "+( Weight/10 )+"/"+( MaxWeight/10 ); + --------------------------------------- *getcharid(<type>{,"<character name>"}) diff --git a/npc/custom/quests/hunting_missions.txt b/npc/custom/quests/hunting_missions.txt index 8da51a1c0..c4e8187de 100644 --- a/npc/custom/quests/hunting_missions.txt +++ b/npc/custom/quests/hunting_missions.txt @@ -3,7 +3,7 @@ //===== By: ================================================== //= Euphy //===== Current Version: ===================================== -//= 1.3a +//= 1.4a //===== Description: ========================================= //= Random hunting missions. //= Rewards are based on quest difficulty. @@ -14,6 +14,9 @@ //= SQL query, both thanks to AnnieRuru. //= 1.3 Re-added a blacklist adapted for the SQL query. //= 1.3a Added mission reset options. +//= 1.4 Fix ranking table using new SQL database [ossi0110] +//= 1.4a Fix a bug when a character has deleted, that account +//= can't do mission. [AnnieRuru] //============================================================ prontera,152,187,6 script Hunting Missions 4_F_EDEN_MASTER,{ @@ -41,7 +44,7 @@ function Chk; function Cm; switch(select(((!Mission0)?" ~ New Mission::":": ~ Mission Status: ~ Abandon Mission")+": ~ Information: ~ Mission Shop: ~ View Top Hunters: ~ ^777777Cancel^000000")) { case 1: mes "[Hunting Missions]"; - if (#Mission_Count) { + if ( query_sql( "SELECT 1 FROM `char_reg_num_db` WHERE `key` = 'Mission0' AND `char_id` IN ( SELECT `char_id` FROM `char` WHERE `account_id` = "+ getcharid(3) +" )", .@dummy ) && #Mission_Count ) { mes "You've started a mission"; mes "on another character."; close; @@ -126,7 +129,7 @@ function Chk; function Cm; case 6: mes "[Hunting Missions]"; mes "The top hunters are:"; - query_sql("SELECT char_id AS id, (SELECT `name` FROM `char` WHERE char_id = id),`value` FROM `char_reg_num_db` WHERE `key` = 'Mission_Total' ORDER BY CAST(`value` AS SIGNED) DESC LIMIT 5",.@id,.@name$,.@val); + query_sql("SELECT char_id AS id, (SELECT `name` FROM `char` WHERE char_id = id),`value` FROM `char_reg_num_db` WHERE `key` = 'Mission_Total' ORDER BY `value` DESC LIMIT 5",.@id,.@name$,.@val); for(set .@i,0; .@i<5; set .@i,.@i+1) mes " [Rank "+(.@i+1)+"] "+((.@name$[.@i] == "")?"^777777none":"^0055FF"+.@name$[.@i]+"^000000 : ^FF0000"+.@val[.@i]+" pt.")+"^000000"; close; |