diff options
Diffstat (limited to 'npc/custom/stock_market.txt')
-rw-r--r-- | npc/custom/stock_market.txt | 794 |
1 files changed, 396 insertions, 398 deletions
diff --git a/npc/custom/stock_market.txt b/npc/custom/stock_market.txt index 23fdfe23f..6f90bcaef 100644 --- a/npc/custom/stock_market.txt +++ b/npc/custom/stock_market.txt @@ -1,11 +1,11 @@ //===== rAthena Script ======================================= //= Stock Market Game //===== By: ================================================== -//= acky (acky@bigpond.net.au) +//= acky //===== Current Version: ===================================== //= 1.3.1 //===== Compatible With: ===================================== -//= Any rAthena Version +//= rAthena SVN //===== Description: ========================================= //= NPC for a stock market game. //===== Additional Comments: ================================= @@ -14,252 +14,252 @@ //= Low prices likely to rise, High prices likely to drop //= Small fix by Galeon //= Lupus: This script lets players make 40,000,000z a day -//= so use it on your own risk +//= so use it on your own risk //============================================================ -prontera,140,181,5 script sharenames -1,{ -end; +- script sharenames -1,{ + end; OnInit: -// Sets the names of the shares // -set $S1N$,"JIN"; -set $S2N$,"VNG"; -set $S3N$,"SHA"; -set $S4N$,"RGC"; -set $S5N$,"PSC"; -set $S6N$,"GNG"; -set $S7N$,"XRO"; -set $S8N$,"GRM"; -set $S9N$,"DOP"; -set $S10N$,"POR"; - -// Transaction fee // -set $S_Trans,1500; - -// Min & Max buyable // -set $S_BuyMin,1; -set $S_BuyMax,1000000; -end; - -// Average Price (Your start prices) // -set $S_Avg,100; - -// Set times of fluctuation // + // Sets the names of the shares // + set $S1N$,"JIN"; + set $S2N$,"VNG"; + set $S3N$,"SHA"; + set $S4N$,"RGC"; + set $S5N$,"PSC"; + set $S6N$,"GNG"; + set $S7N$,"XRO"; + set $S8N$,"GRM"; + set $S9N$,"DOP"; + set $S10N$,"POR"; + + // Transaction fee // + set $S_Trans,1500; + + // Min & Max buyable // + set $S_BuyMin,1; + set $S_BuyMax,1000000; + end; + + // Average Price (Your start prices) // + set $S_Avg,100; + + // Set times of fluctuation // OnClock1100: -set $S_LastUpd$,"12:00"; -goto S_Fluc; -end; + set $S_LastUpd$,"12:00"; + goto S_Fluc; + end; OnClock0000: -set $S_LastUpd$,"00:00"; -goto S_Fluc; -end; + set $S_LastUpd$,"00:00"; + goto S_Fluc; + end; OnClock0600: -set $S_LastUpd$,"06:00"; -goto S_Fluc; -end; + set $S_LastUpd$,"06:00"; + goto S_Fluc; + end; OnClock1800: -set $S_LastUpd$,"18:00"; -goto S_Fluc; -end; + set $S_LastUpd$,"18:00"; + goto S_Fluc; + end; OnClock2100: -set $S_LastUpd$,"21:00"; -goto S_Fluc; -end; + set $S_LastUpd$,"21:00"; + goto S_Fluc; + end; OnClock0900: -set $S_LastUpd$,"09:00"; -goto S_Fluc; -end; + set $S_LastUpd$,"09:00"; + goto S_Fluc; + end; OnClock1500: -set $S_LastUpd$,"15:00"; -goto S_Fluc; -end; + set $S_LastUpd$,"15:00"; + goto S_Fluc; + end; S_Fluc: -set $fluc,rand (-6,6); -set $S1B,$S1; -set $S1,$S1+$fluc; -if ($S1 < 25) set $S1,$S1+3; -if ($S1 < 50) set $S1,$S1+2; -if ($S1 > 150) set $S1,$S1-2; -if ($S1 > 175) set $S1,$S1-3; -if ($S1 < 1) set $S1,1; - -set $fluc,rand (-6,6); -set $S2B,$S2; -set $S2,$S2+$fluc; -if ($S2 < 25) set $S2,$S2+3; -if ($S2 < 50) set $S2,$S2+2; -if ($S2 > 150) set $S2,$S2-2; -if ($S2 > 175) set $S2,$S2-3; -if ($S2 < 1) set $S2,1; - -set $fluc,rand (-6,6); -set $S3B,$S3; -set $S3,$S3+$fluc; -if ($S3 < 25) set $S3,$S3+3; -if ($S3 < 50) set $S3,$S3+2; -if ($S3 > 150) set $S3,$S3-2; -if ($S3 > 175) set $S3,$S3-3; -if ($S3 < 1) set $S3,1; - -set $fluc,rand (-6,6); -set $S4B,$S4; -set $S4,$S4+$fluc; -if ($S4 < 25) set $S4,$S4+3; -if ($S4 < 50) set $S4,$S4+2; -if ($S4 > 150) set $S4,$S4-2; -if ($S4 > 175) set $S4,$S4-3; -if ($S4 < 1) set $S4,1; - -set $fluc,rand (-6,6); -set $S5B,$S5; -set $S5,$S5+$fluc; -if ($S5 < 25) set $S5,$S5+3; -if ($S5 < 50) set $S5,$S5+2; -if ($S5 > 150) set $S5,$S5-2; -if ($S5 > 175) set $S5,$S5-3; -if ($S5 < 1) set $S5,1; - -set $fluc,rand (-6,6); -set $S6B,$S6; -set $S6,$S6+$fluc; -if ($S6 < 25) set $S6,$S6+3; -if ($S6 < 50) set $S6,$S6+2; -if ($S6 > 150) set $S6,$S6-2; -if ($S6 > 175) set $S6,$S6-3; -if ($S6 < 1) set $S6,1; - -set $fluc,rand (-6,6); -set $S7B,$S7; -set $S7,$S7+$fluc; -if ($S7 < 25) set $S7,$S7+3; -if ($S7 < 50) set $S7,$S7+2; -if ($S7 > 150) set $S7,$S7-2; -if ($S7 > 175) set $S7,$S7-3; -if ($S7 < 1) set $S7,1; - -set $fluc,rand (-6,6); -set $S8B,$S8; -set $S8,$S8+$fluc; -if ($S8 < 25) set $S8,$S8+3; -if ($S8 < 50) set $S8,$S8+2; -if ($S8 > 150) set $S8,$S8-2; -if ($S8 > 175) set $S8,$S8-3; -if ($S8 < 1) set $S8,1; - -set $fluc,rand (-6,6); -set $S9B,$S9; -set $S9,$S9+$fluc; -if ($S9 < 25) set $S9,$S9+3; -if ($S9 < 50) set $S9,$S9+2; -if ($S9 > 150) set $S9,$S9-2; -if ($S9 > 175) set $S9,$S9-3; -if ($S9 < 1) set $S9,1; - -set $fluc,rand (-6,6); -set $S10B,$S10; -set $S10,$S10+$fluc; -if ($S10 < 25) set $S10,$S10+3; -if ($S10 < 50) set $S10,$S10+2; -if ($S10 > 150) set $S10,$S10-2; -if ($S10 > 175) set $S10,$S10-3; -if ($S10 < 1) set $S10,1; -end; + set $fluc,rand (-6,6); + set $S1B,$S1; + set $S1,$S1+$fluc; + if ($S1 < 25) set $S1,$S1+3; + if ($S1 < 50) set $S1,$S1+2; + if ($S1 > 150) set $S1,$S1-2; + if ($S1 > 175) set $S1,$S1-3; + if ($S1 < 1) set $S1,1; + + set $fluc,rand (-6,6); + set $S2B,$S2; + set $S2,$S2+$fluc; + if ($S2 < 25) set $S2,$S2+3; + if ($S2 < 50) set $S2,$S2+2; + if ($S2 > 150) set $S2,$S2-2; + if ($S2 > 175) set $S2,$S2-3; + if ($S2 < 1) set $S2,1; + + set $fluc,rand (-6,6); + set $S3B,$S3; + set $S3,$S3+$fluc; + if ($S3 < 25) set $S3,$S3+3; + if ($S3 < 50) set $S3,$S3+2; + if ($S3 > 150) set $S3,$S3-2; + if ($S3 > 175) set $S3,$S3-3; + if ($S3 < 1) set $S3,1; + + set $fluc,rand (-6,6); + set $S4B,$S4; + set $S4,$S4+$fluc; + if ($S4 < 25) set $S4,$S4+3; + if ($S4 < 50) set $S4,$S4+2; + if ($S4 > 150) set $S4,$S4-2; + if ($S4 > 175) set $S4,$S4-3; + if ($S4 < 1) set $S4,1; + + set $fluc,rand (-6,6); + set $S5B,$S5; + set $S5,$S5+$fluc; + if ($S5 < 25) set $S5,$S5+3; + if ($S5 < 50) set $S5,$S5+2; + if ($S5 > 150) set $S5,$S5-2; + if ($S5 > 175) set $S5,$S5-3; + if ($S5 < 1) set $S5,1; + + set $fluc,rand (-6,6); + set $S6B,$S6; + set $S6,$S6+$fluc; + if ($S6 < 25) set $S6,$S6+3; + if ($S6 < 50) set $S6,$S6+2; + if ($S6 > 150) set $S6,$S6-2; + if ($S6 > 175) set $S6,$S6-3; + if ($S6 < 1) set $S6,1; + + set $fluc,rand (-6,6); + set $S7B,$S7; + set $S7,$S7+$fluc; + if ($S7 < 25) set $S7,$S7+3; + if ($S7 < 50) set $S7,$S7+2; + if ($S7 > 150) set $S7,$S7-2; + if ($S7 > 175) set $S7,$S7-3; + if ($S7 < 1) set $S7,1; + + set $fluc,rand (-6,6); + set $S8B,$S8; + set $S8,$S8+$fluc; + if ($S8 < 25) set $S8,$S8+3; + if ($S8 < 50) set $S8,$S8+2; + if ($S8 > 150) set $S8,$S8-2; + if ($S8 > 175) set $S8,$S8-3; + if ($S8 < 1) set $S8,1; + + set $fluc,rand (-6,6); + set $S9B,$S9; + set $S9,$S9+$fluc; + if ($S9 < 25) set $S9,$S9+3; + if ($S9 < 50) set $S9,$S9+2; + if ($S9 > 150) set $S9,$S9-2; + if ($S9 > 175) set $S9,$S9-3; + if ($S9 < 1) set $S9,1; + + set $fluc,rand (-6,6); + set $S10B,$S10; + set $S10,$S10+$fluc; + if ($S10 < 25) set $S10,$S10+3; + if ($S10 < 50) set $S10,$S10+2; + if ($S10 > 150) set $S10,$S10-2; + if ($S10 > 175) set $S10,$S10-3; + if ($S10 < 1) set $S10,1; + end; } -- script Stock Market::stockmarket 109,{ -// Ensures no trading when default prices have not been set // -set @stotal,$S1+$S2+$S3+$S4+$S5+$S6+$S7+$S8+$S9+$S10; -if (@stotal > 0) goto S_Start; -mes "[Stock Market]"; -mes "Trading is currently closed."; -if (getgmlevel() > 90) goto GM_Open; -close; +prontera,140,181,5 script Stock Market::stockmarket 109,{ + // Ensures no trading when default prices have not been set // + set @stotal,$S1+$S2+$S3+$S4+$S5+$S6+$S7+$S8+$S9+$S10; + if (@stotal > 0) goto S_Start; + mes "[Stock Market]"; + mes "Trading is currently closed."; + if (getgmlevel() > 90) goto GM_Open; + close; -// Begining of interface // + // Begining of interface // S_Start: -mes "[Stock Market]"; -mes "Last fluctuation: " + $S_LastUpd$; - -// Loss/Gain in price // -set @S1Update,$S1-$S1B; -set @S2Update,$S2-$S2B; -set @S3Update,$S3-$S3B; -set @S4Update,$S4-$S4B; -set @S5Update,$S5-$S5B; -set @S6Update,$S6-$S6B; -set @S7Update,$S7-$S7B; -set @S8Update,$S8-$S8B; -set @S9Update,$S9-$S9B; -set @S10Update,$S10-$S10B; - -// Makes Loss/Gain Red/Green // -if (@S1Update < 0) set @S1Update$,"^FF0000"+@S1Update+"^000000"; -if (@S1Update > 0) set @S1Update$,"^00FF00+"+@S1Update+"^000000"; -if (@S1Update == 0) set @S1Update$,@S1Update; - -if (@S2Update < 0) set @S2Update$,"^FF0000"+@S2Update+"^000000"; -if (@S2Update > 0) set @S2Update$,"^00FF00+"+@S2Update+"^000000"; -if (@S2Update == 0) set @S2Update$,@S2Update; - -if (@S3Update < 0) set @S3Update$,"^FF0000"+@S3Update+"^000000"; -if (@S3Update > 0) set @S3Update$,"^00FF00+"+@S3Update+"^000000"; -if (@S3Update == 0) set @S3Update$,@S3Update; - -if (@S4Update < 0) set @S4Update$,"^FF0000"+@S4Update+"^000000"; -if (@S4Update > 0) set @S4Update$,"^00FF00+"+@S4Update+"^000000"; -if (@S4Update == 0) set @S4Update$,@S4Update; - -if (@S5Update < 0) set @S5Update$,"^FF0000"+@S5Update+"^000000"; -if (@S5Update > 0) set @S5Update$,"^00FF00+"+@S5Update+"^000000"; -if (@S5Update == 0) set @S5Update$,@S5Update; - -if (@S6Update < 0) set @S6Update$,"^FF0000"+@S6Update+"^000000"; -if (@S6Update > 0) set @S6Update$,"^00FF00+"+@S6Update+"^000000"; -if (@S6Update == 0) set @S6Update$,@S6Update; - -if (@S7Update < 0) set @S7Update$,"^FF0000"+@S7Update+"^000000"; -if (@S7Update > 0) set @S7Update$,"^00FF00+"+@S7Update+"^000000"; -if (@S7Update == 0) set @S7Update$,@S7Update; - -if (@S8Update < 0) set @S8Update$,"^FF0000"+@S8Update+"^000000"; -if (@S8Update > 0) set @S8Update$,"^00FF00+"+@S8Update+"^000000"; -if (@S8Update == 0) set @S8Update$,@S8Update; - -if (@S9Update < 0) set @S9Update$,"^FF0000"+@S9Update+"^000000"; -if (@S9Update > 0) set @S9Update$,"^00FF00+"+@S9Update+"^000000"; -if (@S9Update == 0) set @S9Update$,@S9Update; - -if (@S10Update < 0) set @S10Update$,"^FF0000"+@S10Update+"^000000"; -if (@S10Update > 0) set @S10Update$,"^00FF00+"+@S10Update+"^000000"; -if (@S10Update == 0) set @S10Update$,@S10Update; - -// Displays shares & prices // -mes "^21698F"+$S1N$+"^000000" + " " + $S1 + "z (" + @S1Update$ + ")"; -mes "^21698F"+$S2N$+"^000000" + " " + $S2 + "z (" + @S2Update$ + ")"; -mes "^21698F"+$S3N$+"^000000" + " " + $S3 + "z (" + @S3Update$ + ")"; -mes "^21698F"+$S4N$+"^000000" + " " + $S4 + "z (" + @S4Update$ + ")"; -mes "^21698F"+$S5N$+"^000000" + " " + $S5 + "z (" + @S5Update$ + ")"; -mes "^21698F"+$S6N$+"^000000" + " " + $S6 + "z (" + @S6Update$ + ")"; -mes "^21698F"+$S7N$+"^000000" + " " + $S7 + "z (" + @S7Update$ + ")"; -mes "^21698F"+$S8N$+"^000000" + " " + $S8 + "z (" + @S8Update$ + ")"; -mes "^21698F"+$S9N$+"^000000" + " " + $S9 + "z (" + @S9Update$ + ")"; -mes "^21698F"+$S10N$+"^000000" + " " + $S10 + "z (" + @S10Update$ + ")"; -next; - -// GM Menu link // -if (getgmlevel() > 90) goto GM_subMenu; -menu "Portfolio",S_Port,"Buy Shares",S_Buy,"Sell Shares",S_Sell,"Cancel",S_Quit; + mes "[Stock Market]"; + mes "Last fluctuation: " + $S_LastUpd$; + + // Loss/Gain in price // + set @S1Update,$S1-$S1B; + set @S2Update,$S2-$S2B; + set @S3Update,$S3-$S3B; + set @S4Update,$S4-$S4B; + set @S5Update,$S5-$S5B; + set @S6Update,$S6-$S6B; + set @S7Update,$S7-$S7B; + set @S8Update,$S8-$S8B; + set @S9Update,$S9-$S9B; + set @S10Update,$S10-$S10B; + + // Makes Loss/Gain Red/Green // + if (@S1Update < 0) set @S1Update$,"^FF0000"+@S1Update+"^000000"; + if (@S1Update > 0) set @S1Update$,"^00FF00+"+@S1Update+"^000000"; + if (@S1Update == 0) set @S1Update$,@S1Update; + + if (@S2Update < 0) set @S2Update$,"^FF0000"+@S2Update+"^000000"; + if (@S2Update > 0) set @S2Update$,"^00FF00+"+@S2Update+"^000000"; + if (@S2Update == 0) set @S2Update$,@S2Update; + + if (@S3Update < 0) set @S3Update$,"^FF0000"+@S3Update+"^000000"; + if (@S3Update > 0) set @S3Update$,"^00FF00+"+@S3Update+"^000000"; + if (@S3Update == 0) set @S3Update$,@S3Update; + + if (@S4Update < 0) set @S4Update$,"^FF0000"+@S4Update+"^000000"; + if (@S4Update > 0) set @S4Update$,"^00FF00+"+@S4Update+"^000000"; + if (@S4Update == 0) set @S4Update$,@S4Update; + + if (@S5Update < 0) set @S5Update$,"^FF0000"+@S5Update+"^000000"; + if (@S5Update > 0) set @S5Update$,"^00FF00+"+@S5Update+"^000000"; + if (@S5Update == 0) set @S5Update$,@S5Update; + + if (@S6Update < 0) set @S6Update$,"^FF0000"+@S6Update+"^000000"; + if (@S6Update > 0) set @S6Update$,"^00FF00+"+@S6Update+"^000000"; + if (@S6Update == 0) set @S6Update$,@S6Update; + + if (@S7Update < 0) set @S7Update$,"^FF0000"+@S7Update+"^000000"; + if (@S7Update > 0) set @S7Update$,"^00FF00+"+@S7Update+"^000000"; + if (@S7Update == 0) set @S7Update$,@S7Update; + + if (@S8Update < 0) set @S8Update$,"^FF0000"+@S8Update+"^000000"; + if (@S8Update > 0) set @S8Update$,"^00FF00+"+@S8Update+"^000000"; + if (@S8Update == 0) set @S8Update$,@S8Update; + + if (@S9Update < 0) set @S9Update$,"^FF0000"+@S9Update+"^000000"; + if (@S9Update > 0) set @S9Update$,"^00FF00+"+@S9Update+"^000000"; + if (@S9Update == 0) set @S9Update$,@S9Update; + + if (@S10Update < 0) set @S10Update$,"^FF0000"+@S10Update+"^000000"; + if (@S10Update > 0) set @S10Update$,"^00FF00+"+@S10Update+"^000000"; + if (@S10Update == 0) set @S10Update$,@S10Update; + + // Displays shares & prices // + mes "^21698F"+$S1N$+"^000000" + " " + $S1 + "z (" + @S1Update$ + ")"; + mes "^21698F"+$S2N$+"^000000" + " " + $S2 + "z (" + @S2Update$ + ")"; + mes "^21698F"+$S3N$+"^000000" + " " + $S3 + "z (" + @S3Update$ + ")"; + mes "^21698F"+$S4N$+"^000000" + " " + $S4 + "z (" + @S4Update$ + ")"; + mes "^21698F"+$S5N$+"^000000" + " " + $S5 + "z (" + @S5Update$ + ")"; + mes "^21698F"+$S6N$+"^000000" + " " + $S6 + "z (" + @S6Update$ + ")"; + mes "^21698F"+$S7N$+"^000000" + " " + $S7 + "z (" + @S7Update$ + ")"; + mes "^21698F"+$S8N$+"^000000" + " " + $S8 + "z (" + @S8Update$ + ")"; + mes "^21698F"+$S9N$+"^000000" + " " + $S9 + "z (" + @S9Update$ + ")"; + mes "^21698F"+$S10N$+"^000000" + " " + $S10 + "z (" + @S10Update$ + ")"; + next; + + // GM Menu link // + if (getgmlevel() > 90) goto GM_subMenu; + menu "Portfolio",S_Port,"Buy Shares",S_Buy,"Sell Shares",S_Sell,"Cancel",S_Quit; GM_subMenu: -menu "Portfolio",S_Port,"Buy Shares",S_Buy,"Sell Shares",S_Sell,"GM Menu",GM_Menu,"Cancel",S_Quit; + menu "Portfolio",S_Port,"Buy Shares",S_Buy,"Sell Shares",S_Sell,"GM Menu",GM_Menu,"Cancel",S_Quit; -// Selling Shares // + // Selling Shares // S_Sell: mes "[Stock Market]"; mes "Enter the name of the share you wish to sell."; @@ -282,7 +282,7 @@ S_Sell: if (zeny < $S_Trans) goto S_NoZeny; set zeny,zeny-$S_Trans; - SELLS1: +SELLS1: if (@sellname$ != $S1N$) goto SELLS2; if (@sellamount > #S1) goto S_SellTooHigh; set @price,@sellamount*$S1; @@ -294,7 +294,7 @@ S_Sell: next; goto S_Start; - SELLS2: +SELLS2: if (@sellname$ != $S2N$) goto SELLS3; if (@sellamount > #S2) goto S_SellTooHigh; set @price,@sellamount*$S2; @@ -306,7 +306,7 @@ S_Sell: next; goto S_Start; - SELLS3: +SELLS3: if (@sellname$ != $S3N$) goto SELLS4; if (@sellamount > #S3) goto S_SellTooHigh; set @price,@sellamount*$S3; @@ -318,7 +318,7 @@ S_Sell: next; goto S_Start; - SELLS4: +SELLS4: if (@sellname$ != $S4N$) goto SELLS5; if (@sellamount > #S4) goto S_SellTooHigh; set @price,@sellamount*$S4; @@ -330,7 +330,7 @@ S_Sell: next; goto S_Start; - SELLS5: +SELLS5: if (@sellname$ != $S5N$) goto SELLS6; if (@sellamount > #S5) goto S_SellTooHigh; set @price,@sellamount*$S5; @@ -342,7 +342,7 @@ S_Sell: next; goto S_Start; - SELLS6: +SELLS6: if (@sellname$ != $S6N$) goto SELLS7; if (@sellamount > #S6) goto S_SellTooHigh; set @price,@sellamount*$S6; @@ -354,7 +354,7 @@ S_Sell: next; goto S_Start; - SELLS7: +SELLS7: if (@sellname$ != $S7N$) goto SELLS8; if (@sellamount > #S7) goto S_SellTooHigh; set @price,@sellamount*$S7; @@ -366,7 +366,7 @@ S_Sell: next; goto S_Start; - SELLS8: +SELLS8: if (@sellname$ != $S8N$) goto SELLS9; if (@sellamount > #S8) goto S_SellTooHigh; set @price,@sellamount*$S8; @@ -378,7 +378,7 @@ S_Sell: next; goto S_Start; - SELLS9: +SELLS9: if (@sellname$ != $S9N$) goto SELLS10; if (@sellamount > #S9) goto S_SellTooHigh; set @price,@sellamount*$S9; @@ -390,7 +390,7 @@ S_Sell: next; goto S_Start; - SELLS10: +SELLS10: if (@sellname$ != $S10N$) goto SELLS11; if (@sellamount > #S10) goto S_SellTooHigh; set @price,@sellamount*$S10; @@ -402,22 +402,22 @@ S_Sell: next; goto S_Start; - SELLS11: +SELLS11: mes "^FF0000Invalid Share Name.^000000"; next; goto S_Start; - S_SellTooHigh: +S_SellTooHigh: mes "^FF0000You don't have that many shares.^000000"; next; goto S_Start; - S_SellInv: +S_SellInv: mes "^FF0000Invalid integer.^000000"; next; goto S_Start; -// Buying Shares // + // Buying Shares // S_Buy: mes "[Stock Market]"; mes "Available shares:"; @@ -449,7 +449,7 @@ S_Buy: // Purchases the shares // - PURS1: +PURS1: if (@buyname$ != $S1N$) goto PURS2; set @price,@buyamount*$S1; if (zeny < @price) goto S_NoZeny; @@ -461,7 +461,7 @@ S_Buy: next; goto S_Start; - PURS2: +PURS2: if (@buyname$ != $S2N$) goto PURS3; set @price,@buyamount*$S2; if (zeny < @price) goto S_NoZeny; @@ -472,7 +472,7 @@ S_Buy: next; goto S_Start; - PURS3: +PURS3: if (@buyname$ != $S3N$) goto PURS4; set @price,@buyamount*$S3; if (zeny < @price) goto S_NoZeny; @@ -483,7 +483,7 @@ S_Buy: next; goto S_Start; - PURS4: +PURS4: if (@buyname$ != $S4N$) goto PURS5; set @price,@buyamount*$S4; if (zeny < @price) goto S_NoZeny; @@ -494,7 +494,7 @@ S_Buy: next; goto S_Start; - PURS5: +PURS5: if (@buyname$ != $S5N$) goto PURS6; set @price,@buyamount*$S5; if (zeny < @price) goto S_NoZeny; @@ -505,7 +505,7 @@ S_Buy: next; goto S_Start; - PURS6: +PURS6: if (@buyname$ != $S6N$) goto PURS7; set @price,@buyamount*$S6; if (zeny < @price) goto S_NoZeny; @@ -516,7 +516,7 @@ S_Buy: next; goto S_Start; - PURS7: +PURS7: if (@buyname$ != $S7N$) goto PURS8; set @price,@buyamount*$S7; if (zeny < @price) goto S_NoZeny; @@ -527,7 +527,7 @@ S_Buy: next; goto S_Start; - PURS8: +PURS8: if (@buyname$ != $S8N$) goto PURS9; set @price,@buyamount*$S8; if (zeny < @price) goto S_NoZeny; @@ -538,7 +538,7 @@ S_Buy: next; goto S_Start; - PURS9: +PURS9: if (@buyname$ != $S9N$) goto PURS10; set @price,@buyamount*$S9; if (zeny < @price) goto S_NoZeny; @@ -549,7 +549,7 @@ S_Buy: next; goto S_Start; - PURS10: +PURS10: if (@buyname$ != $S10N$) goto PURS11; set @price,@buyamount*$S10; if (zeny < @price) goto S_NoZeny; @@ -560,234 +560,232 @@ S_Buy: next; goto S_Start; - PURS11: +PURS11: goto S_InvName; // Number too low // - S_TooLow: +S_TooLow: mes "^FF0000Minimum of " + $S_BuyMin + " shares can be bought at a time.^000000"; next; goto S_Start; // Number too high // - S_TooHigh: +S_TooHigh: mes "^FF0000Maximum number of " + $S_BuyMax + " shares can be bought at a time.^000000"; next; goto S_Start; - S_NoZeny: +S_NoZeny: mes "^FF0000You do not have enough zeny.^000000"; next; goto S_Start; // Sends user to start if name invalid // - S_InvName: +S_InvName: mes "^FF0000Invalid share name.^000000"; next; goto S_Start; -// Displays your total amount // + // Displays your total amount // S_Port: -mes "[Stock Market]"; + mes "[Stock Market]"; - ACCS1: +ACCS1: if (#S1 < 1) goto ACCS2; set @S1,#S1*$S1; mes $S1N$ + ": " + #S1 + " x " + $S1 + "z = " + @S1 + "z"; - ACCS2: +ACCS2: if (#S2 < 1) goto ACCS3; set @S2,#S2*$S2; mes $S2N$ + ": " + #S2 + " x " + $S2 + "z = " + @S2 + "z"; - ACCS3: +ACCS3: if (#S3 < 1) goto ACCS4; set @S3,#S3*$S3; mes $S3N$ + ": " + #S3 + " x " + $S3 + "z = " + @S3 + "z"; - ACCS4: +ACCS4: if (#S4 < 1) goto ACCS5; set @S4,#S4*$S4; mes $S4N$ + ": " + #S4 + " x " + $S4 + "z = " + @S4 + "z"; - ACCS5: +ACCS5: if (#S5 < 1) goto ACCS6; set @S5,#S5*$S5; mes $S5N$ + ": " + #S5 + " x " + $S5 + "z = " + @S5 + "z"; - ACCS6: +ACCS6: if (#S6 < 1) goto ACCS7; set @S6,#S6*$S6; mes $S6N$ + ": " + #S6 + " x " + $S6 + "z = " + @S6 + "z"; - ACCS7: +ACCS7: if (#S7 < 1) goto ACCS8; set @S7,#S7*$S7; mes $S7N$ + ": " + #S7 + " x " + $S7 + "z = " + @S7 + "z"; - ACCS8: +ACCS8: if (#S8 < 1) goto ACCS9; set @S8,#S8*$S8; mes $S8N$ + ": " + #S8 + " x " + $S8 + "z = " + @S8 + "z"; - ACCS9: +ACCS9: if (#S9 < 1) goto ACCS10; set @S9,#S9*$S9; mes $S9N$ + ": " + #S9 + " x " + $S9 + "z = " + @S9 + "z"; - ACCS10: +ACCS10: if (#S10 < 1) goto ACCS11; set @S10,#S10*$S10; mes $S10N$ + ": " + #S10 + " x " + $S10 + "z = " + @S10 + "z"; // Total // - ACCS11: +ACCS11: set @total,@S1 + @S2 + @S3 + @S4 + @S5 + @S6 + @S7 + @S8 + @S9 + @S10; mes "Total value: "+@total+"z"; next; goto S_Start; -// GM MENU // + // GM MENU // GM_Menu: -mes "[Stock Market]"; -mes "Master, do you require anything?"; -menu "Fluctuate Market",S_Fluc,"Reset Prices",GM_Open,"Nothing",S_Start; + mes "[Stock Market]"; + mes "Master, do you require anything?"; + menu "Fluctuate Market",S_Fluc,"Reset Prices",GM_Open,"Nothing",S_Start; S_Fluc: -set $fluc,rand (-6,6); -set $S1B,$S1; -set $S1,$S1+$fluc; -if ($S1 < 25) set $S1,$S1+3; -if ($S1 < 50) set $S1,$S1+2; -if ($S1 > 150) set $S1,$S1-2; -if ($S1 > 175) set $S1,$S1-3; -if ($S1 < 1) set $S1,1; - -set $fluc,rand (-6,6); -set $S2B,$S2; -set $S2,$S2+$fluc; -if ($S2 < 25) set $S2,$S2+3; -if ($S2 < 50) set $S2,$S2+2; -if ($S2 > 150) set $S2,$S2-2; -if ($S2 > 175) set $S2,$S2-3; -if ($S2 < 2) set $S2,1; - -set $fluc,rand (-6,6); -set $S3B,$S3; -set $S3,$S3+$fluc; -if ($S3 < 25) set $S3,$S3+3; -if ($S3 < 50) set $S3,$S3+2; -if ($S3 > 150) set $S3,$S3-2; -if ($S3 > 175) set $S3,$S3-3; -if ($S3 < 1) set $S3,1; - -set $fluc,rand (-6,6); -set $S4B,$S4; -set $S4,$S4+$fluc; -if ($S4 < 25) set $S4,$S4+3; -if ($S4 < 50) set $S4,$S4+2; -if ($S4 > 150) set $S4,$S4-2; -if ($S4 > 175) set $S4,$S4-3; -if ($S4 < 1) set $S4,1; - -set $fluc,rand (-6,6); -set $S5B,$S5; -set $S5,$S5+$fluc; -if ($S5 < 25) set $S5,$S5+3; -if ($S5 < 50) set $S5,$S5+2; -if ($S5 > 150) set $S5,$S5-2; -if ($S5 > 175) set $S5,$S5-3; -if ($S5 < 1) set $S5,1; - -set $fluc,rand (-6,6); -set $S6B,$S6; -set $S6,$S6+$fluc; -if ($S6 < 25) set $S6,$S6+3; -if ($S6 < 50) set $S6,$S6+2; -if ($S6 > 150) set $S6,$S6-2; -if ($S6 > 175) set $S6,$S6-3; -if ($S6 < 1) set $S6,1; - -set $fluc,rand (-6,6); -set $S7B,$S7; -set $S7,$S7+$fluc; -if ($S7 < 25) set $S7,$S7+3; -if ($S7 < 50) set $S7,$S7+2; -if ($S7 > 150) set $S7,$S7-2; -if ($S7 > 175) set $S7,$S7-3; -if ($S7 < 1) set $S7,1; - -set $fluc,rand (-6,6); -set $S8B,$S8; -set $S8,$S8+$fluc; -if ($S8 < 25) set $S8,$S8+3; -if ($S8 < 50) set $S8,$S8+2; -if ($S8 > 150) set $S8,$S8-2; -if ($S8 > 175) set $S8,$S8-3; -if ($S8 < 1) set $S8,1; - -set $fluc,rand (-6,6); -set $S9B,$S9; -set $S9,$S9+$fluc; -if ($S9 < 25) set $S9,$S9+3; -if ($S9 < 50) set $S9,$S9+2; -if ($S9 > 150) set $S9,$S9-2; -if ($S9 > 175) set $S9,$S9-3; -if ($S9 < 1) set $S9,1; - -set $fluc,rand (-6,6); -set $S10B,$S10; -set $S10,$S10+$fluc; -if ($S10 < 25) set $S10,$S10+3; -if ($S10 < 50) set $S10,$S10+2; -if ($S10 > 150) set $S10,$S10-2; -if ($S10 > 175) set $S10,$S10-3; -if ($S10 < 1) set $S10,1; - -set $S_LastUpd$,"GM Fluctuation"; -mes "Market fluctuated."; -close; + set $fluc,rand (-6,6); + set $S1B,$S1; + set $S1,$S1+$fluc; + if ($S1 < 25) set $S1,$S1+3; + if ($S1 < 50) set $S1,$S1+2; + if ($S1 > 150) set $S1,$S1-2; + if ($S1 > 175) set $S1,$S1-3; + if ($S1 < 1) set $S1,1; + + set $fluc,rand (-6,6); + set $S2B,$S2; + set $S2,$S2+$fluc; + if ($S2 < 25) set $S2,$S2+3; + if ($S2 < 50) set $S2,$S2+2; + if ($S2 > 150) set $S2,$S2-2; + if ($S2 > 175) set $S2,$S2-3; + if ($S2 < 2) set $S2,1; + + set $fluc,rand (-6,6); + set $S3B,$S3; + set $S3,$S3+$fluc; + if ($S3 < 25) set $S3,$S3+3; + if ($S3 < 50) set $S3,$S3+2; + if ($S3 > 150) set $S3,$S3-2; + if ($S3 > 175) set $S3,$S3-3; + if ($S3 < 1) set $S3,1; + + set $fluc,rand (-6,6); + set $S4B,$S4; + set $S4,$S4+$fluc; + if ($S4 < 25) set $S4,$S4+3; + if ($S4 < 50) set $S4,$S4+2; + if ($S4 > 150) set $S4,$S4-2; + if ($S4 > 175) set $S4,$S4-3; + if ($S4 < 1) set $S4,1; + + set $fluc,rand (-6,6); + set $S5B,$S5; + set $S5,$S5+$fluc; + if ($S5 < 25) set $S5,$S5+3; + if ($S5 < 50) set $S5,$S5+2; + if ($S5 > 150) set $S5,$S5-2; + if ($S5 > 175) set $S5,$S5-3; + if ($S5 < 1) set $S5,1; + + set $fluc,rand (-6,6); + set $S6B,$S6; + set $S6,$S6+$fluc; + if ($S6 < 25) set $S6,$S6+3; + if ($S6 < 50) set $S6,$S6+2; + if ($S6 > 150) set $S6,$S6-2; + if ($S6 > 175) set $S6,$S6-3; + if ($S6 < 1) set $S6,1; + + set $fluc,rand (-6,6); + set $S7B,$S7; + set $S7,$S7+$fluc; + if ($S7 < 25) set $S7,$S7+3; + if ($S7 < 50) set $S7,$S7+2; + if ($S7 > 150) set $S7,$S7-2; + if ($S7 > 175) set $S7,$S7-3; + if ($S7 < 1) set $S7,1; + + set $fluc,rand (-6,6); + set $S8B,$S8; + set $S8,$S8+$fluc; + if ($S8 < 25) set $S8,$S8+3; + if ($S8 < 50) set $S8,$S8+2; + if ($S8 > 150) set $S8,$S8-2; + if ($S8 > 175) set $S8,$S8-3; + if ($S8 < 1) set $S8,1; + + set $fluc,rand (-6,6); + set $S9B,$S9; + set $S9,$S9+$fluc; + if ($S9 < 25) set $S9,$S9+3; + if ($S9 < 50) set $S9,$S9+2; + if ($S9 > 150) set $S9,$S9-2; + if ($S9 > 175) set $S9,$S9-3; + if ($S9 < 1) set $S9,1; + + set $fluc,rand (-6,6); + set $S10B,$S10; + set $S10,$S10+$fluc; + if ($S10 < 25) set $S10,$S10+3; + if ($S10 < 50) set $S10,$S10+2; + if ($S10 > 150) set $S10,$S10-2; + if ($S10 > 175) set $S10,$S10-3; + if ($S10 < 1) set $S10,1; + + set $S_LastUpd$,"GM Fluctuation"; + mes "Market fluctuated."; + close; GM_Open: -menu "Set prices to...",GM_Set,"Cancel",-; -mes "Farewell."; -close; + menu "Set prices to...",GM_Set,"Cancel",-; + mes "Farewell."; + close; GM_Set: -mes "Are you sure you want to reset?"; -mes "^FF0000All share values will become the same.^000000"; -next; -menu "Yes",-,"No",GM_Menu; -set @gmset,0; -input @gmset; -set $S1,@gmset; -set $S2,@gmset; -set $S3,@gmset; -set $S4,@gmset; -set $S5,@gmset; -set $S6,@gmset; -set $S7,@gmset; -set $S8,@gmset; -set $S9,@gmset; -set $S10,@gmset; -set $S1B,@gmset; -set $S2B,@gmset; -set $S3B,@gmset; -set $S4B,@gmset; -set $S5B,@gmset; -set $S6B,@gmset; -set $S7B,@gmset; -set $S8B,@gmset; -set $S9B,@gmset; -set $S10B,@gmset; -mes "All prices changed to " + @gmset + "z."; -close; + mes "Are you sure you want to reset?"; + mes "^FF0000All share values will become the same.^000000"; + next; + menu "Yes",-,"No",GM_Menu; + set @gmset,0; + input @gmset; + set $S1,@gmset; + set $S2,@gmset; + set $S3,@gmset; + set $S4,@gmset; + set $S5,@gmset; + set $S6,@gmset; + set $S7,@gmset; + set $S8,@gmset; + set $S9,@gmset; + set $S10,@gmset; + set $S1B,@gmset; + set $S2B,@gmset; + set $S3B,@gmset; + set $S4B,@gmset; + set $S5B,@gmset; + set $S6B,@gmset; + set $S7B,@gmset; + set $S8B,@gmset; + set $S9B,@gmset; + set $S10B,@gmset; + mes "All prices changed to " + @gmset + "z."; + close; S_Quit: -mes "[Stock Market]"; -mes "Goodbye."; -close; + mes "[Stock Market]"; + mes "Goodbye."; + close; } - -prontera,140,181,5 duplicate(stockmarket) Stock Market 109 |