summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorshennetsind <ind@henn.et>2014-11-03 13:24:11 -0200
committershennetsind <ind@henn.et>2014-11-03 13:24:11 -0200
commitd19194a008023e2cad74c9b9cbf75a0b584104da (patch)
treee25da955261e2779b475a63b0c06236050251a55
parentad8ef895737550c58ea29196d9b623a1f5e3cba0 (diff)
downloadhercules-d19194a008023e2cad74c9b9cbf75a0b584104da.tar.gz
hercules-d19194a008023e2cad74c9b9cbf75a0b584104da.tar.bz2
hercules-d19194a008023e2cad74c9b9cbf75a0b584104da.tar.xz
hercules-d19194a008023e2cad74c9b9cbf75a0b584104da.zip
Adjusted roulette logic ( see 239d480487e24294975f35ed55f210837ad1088e )
Special Thanks to Yommy and Ziu for the adjusted logic! This commit also introduces the proper coins to obtain the roulette points, thanks to Michieru. Signed-off-by: shennetsind <ind@henn.et>
-rw-r--r--db/pre-re/item_db.conf61
-rw-r--r--db/re/item_db.conf60
-rw-r--r--src/map/clif.c28
3 files changed, 119 insertions, 30 deletions
diff --git a/db/pre-re/item_db.conf b/db/pre-re/item_db.conf
index 925a149fd..95503ee11 100644
--- a/db/pre-re/item_db.conf
+++ b/db/pre-re/item_db.conf
@@ -1780,10 +1780,22 @@ item_db: (
{
Id: 671
AegisName: "Gold_Coin"
- Name: "Gold Coin"
- Type: 3
- Buy: 10000
- Weight: 40
+ Name: "Gold Roulette Coin"
+ Type: 2
+ Buy: 0
+ Weight: 0
+ Upper: 63
+ Trade: {
+ nodrop: true
+ notrade: true
+ noselltonpc: true
+ nocart: true
+ nostorage: true
+ nogstorage: true
+ nomail: true
+ noauction: true
+ }
+ Script: <" set TmpRouletteGold,TmpRouletteGold + 1; ">
},
{
Id: 672
@@ -1812,10 +1824,22 @@ item_db: (
{
Id: 675
AegisName: "Silver_Coin"
- Name: "Silver Coin"
- Type: 3
- Buy: 5000
- Weight: 40
+ Name: "Silver Roulette Coin"
+ Type: 2
+ Buy: 0
+ Weight: 0
+ Upper: 63
+ Trade: {
+ nodrop: true
+ notrade: true
+ noselltonpc: true
+ nocart: true
+ nostorage: true
+ nogstorage: true
+ nomail: true
+ noauction: true
+ }
+ Script: <" set TmpRouletteSilver,TmpRouletteSilver + 1; ">
},
{
Id: 676
@@ -89203,4 +89227,25 @@ item_db: (
Stack: [20, 1]
Script: <" itemskill RK_LUXANIMA,1; ">
},
+{
+ Id: 22837
+ AegisName: "Integer_Time"
+ Name: "Integer Time"
+ Type: 2
+ Buy: 0
+ Weight: 0
+ Upper: 63
+ EquipLv: 50
+ Trade: {
+ nodrop: true
+ notrade: true
+ noselltonpc: true
+ nocart: true
+ nostorage: true
+ nogstorage: true
+ nomail: true
+ noauction: true
+ }
+ Script: <" set TmpRouletteBronze,TmpRouletteBronze + 1; ">
+},
)
diff --git a/db/re/item_db.conf b/db/re/item_db.conf
index 984549b55..6a66cba63 100644
--- a/db/re/item_db.conf
+++ b/db/re/item_db.conf
@@ -1933,11 +1933,22 @@ item_db: (
{
Id: 671
AegisName: "Gold_Coin"
- Name: "Gold Coin"
- Type: 3
- Buy: 10000
- Weight: 40
+ Name: "Gold Roulette Coin"
+ Type: 2
+ Buy: 0
+ Weight: 0
Upper: 63
+ Trade: {
+ nodrop: true
+ notrade: true
+ noselltonpc: true
+ nocart: true
+ nostorage: true
+ nogstorage: true
+ nomail: true
+ noauction: true
+ }
+ Script: <" set TmpRouletteGold,TmpRouletteGold + 1; ">
},
{
Id: 672
@@ -1969,11 +1980,22 @@ item_db: (
{
Id: 675
AegisName: "Silver_Coin"
- Name: "Silver Coin"
- Type: 3
- Buy: 5000
- Weight: 40
+ Name: "Silver Roulette Coin"
+ Type: 2
+ Buy: 0
+ Weight: 0
Upper: 63
+ Trade: {
+ nodrop: true
+ notrade: true
+ noselltonpc: true
+ nocart: true
+ nostorage: true
+ nogstorage: true
+ nomail: true
+ noauction: true
+ }
+ Script: <" set TmpRouletteSilver,TmpRouletteSilver + 1; ">
},
{
Id: 676
@@ -118222,6 +118244,28 @@ item_db: (
">
},
{
+ Id: 22837
+ AegisName: "Integer_Time"
+ Name: "Integer Time"
+ Type: 2
+ Buy: 0
+ Weight: 0
+ Upper: 63
+ EquipLv: 50
+ Trade: {
+ nodrop: true
+ notrade: true
+ noselltonpc: true
+ nocart: true
+ nostorage: true
+ nogstorage: true
+ nomail: true
+ noauction: true
+ }
+ Script: <" set TmpRouletteBronze,TmpRouletteBronze + 1; ">
+},
+{
+
Id: 22838
AegisName: "Something_Candy_Holder"
Name: "Something Candy Holder"
diff --git a/src/map/clif.c b/src/map/clif.c
index 37cd03119..f5f1c5512 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -18373,25 +18373,25 @@ void clif_parse_RouletteGenerate(int fd, struct map_session_data* sd) {
if( sd->roulette.stage >= MAX_ROULETTE_LEVEL )
stage = sd->roulette.stage = 0;
- if( stage <= 2 ) {
- if( pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) <= 0 )
- result = GENERATE_ROULETTE_NO_ENOUGH_POINT;
- } else if ( stage <= 4 ) {
- if( pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) <= 0 )
- result = GENERATE_ROULETTE_NO_ENOUGH_POINT;
- } else if ( stage <= 6 ) {
- if( pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) <= 0 )
+ if( stage == 0 ) {
+ if( pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) <= 0 &&
+ pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) < 10 &&
+ pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) < 10 )
result = GENERATE_ROULETTE_NO_ENOUGH_POINT;
}
if( result == GENERATE_ROULETTE_SUCCESS ) {
- if( stage <= 2 ) {
- pc_setglobalreg(sd, script->add_str("TmpRouletteBronze"), pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) - 1);
- } else if ( stage <= 4 ) {
- pc_setglobalreg(sd, script->add_str("TmpRouletteSilver"), pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) - 1);
- } else if ( stage <= 6 ) {
- pc_setglobalreg(sd, script->add_str("TmpRouletteGold"), pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) - 1);
+ if( stage == 0 ) {
+ if( pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) > 0 ) {
+ pc_setglobalreg(sd, script->add_str("TmpRouletteBronze"), pc_readglobalreg(sd, script->add_str("TmpRouletteBronze")) - 1);
+ } else if( pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) > 9 ) {
+ pc_setglobalreg(sd, script->add_str("TmpRouletteSilver"), pc_readglobalreg(sd, script->add_str("TmpRouletteSilver")) - 10);
+ stage = sd->roulette.stage = 2;
+ } else if( pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) > 9 ) {
+ pc_setglobalreg(sd, script->add_str("TmpRouletteGold"), pc_readglobalreg(sd, script->add_str("TmpRouletteGold")) - 10);
+ stage = sd->roulette.stage = 4;
+ }
}
sd->roulette.prizeStage = stage;