summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFedja Beader <fedja@protonmail.ch>2024-08-06 20:45:39 +0200
committerJesusalva Jesusalva <jesusalva@tmw2.org>2024-08-30 13:26:38 +0000
commit320b52711935999404131fbacfaee1f2d90f0703 (patch)
treef2d1a16c612a5ac6951351a9a10f8c6d1520504d
parentbdeb18dc23576e855108bb7a53e0ab901b72b225 (diff)
downloadserverdata-casino_code_improvements.tar.gz
serverdata-casino_code_improvements.tar.bz2
serverdata-casino_code_improvements.tar.xz
serverdata-casino_code_improvements.zip
Apply a little polish on the shiny codecasino_code_improvements
-rw-r--r--npc/031-4/slots.txt46
1 files changed, 26 insertions, 20 deletions
diff --git a/npc/031-4/slots.txt b/npc/031-4/slots.txt
index 974ce7f9e..8771a2edc 100644
--- a/npc/031-4/slots.txt
+++ b/npc/031-4/slots.txt
@@ -161,7 +161,7 @@ function spin {
// Check how many symbols you got identical
// This is not the same as normal slot machines!
- .@s = 0;
+ .@s = 1;
if (.@a == .@b || .@a == .@c || .@a == .@d || .@a == .@e)
.@s += 1;
if (.@b == .@c || .@b == .@d || .@b == .@e)
@@ -177,33 +177,41 @@ function spin {
mes "";
mesn;
- if (.@a == .@b && .@a == .@c && .@a == .@d && .@a == .@e && .@a == 7) {
- getitem ImperialCrown, 1;
- kamibroadcast(b(sprintf("%s has acquired the %s!", strcharinfo(0), getitemlink(ImperialCrown))), "JACKPOT");
- mesc b(l("Jackpot! Thou hast been crowned eternal as the gambler king!")), 4;
- } else if (.@a == .@b && .@a == .@c && .@a == .@d && .@a == .@e) {
- if (countitem(Blanket))
- getitem Bathrobe, 1;
- else
- getitem StrangeCoin, 20;
- Zeny += 350;
- gethomunexp 15000;
- mesc b(l("Thou hast been lucky and a %s prize was given to thee.", l("major"))), 4;
- } else if (.@s == 3) {
+
+ switch (.@s) {
+ case 5:
+ if (.@a == 7) {
+ getitem ImperialCrown, 1;
+ kamibroadcast(b(sprintf("%s has acquired the %s!", strcharinfo(0), getitemlink(ImperialCrown))), "JACKPOT");
+ mesc b(l("Jackpot! Thou hast been crowned eternal as the gambler king!")), 4;
+ } else {
+ if (countitem(Blanket))
+ getitem Bathrobe, 1;
+ else
+ getitem StrangeCoin, 20;
+ Zeny += 350;
+ gethomunexp 15000;
+ mesc b(l("Thou hast been lucky and a %s prize was given to thee.", l("major"))), 4;
+ }
+ break;
+ case 4:
Zeny += 250;
getitem StrangeCoin, rand2(1,5);
gethomunexp 5000;
mesc l("Thou hast been lucky and a %s prize was given to thee.", l("normal")), 3;
- } else if (.@s == 2) {
+ break;
+ case 3:
Zeny += 150;
getitem CasinoCoins, rand2(1,5);
gethomunexp 500;
mesc l("Thou hast been lucky and a %s prize was given to thee.", l("small")), 2;
- } else if (.@s == 1) {
+ break;
+ case 2:
Zeny += 50;
gethomunexp 50;
mesc l("Thou hast been lucky and a %s prize was given to thee.", l("minor")), 6;
- } else {
+ break;
+ default:
mesc l("It wasn't this time..."), 9;
}
return;
@@ -212,8 +220,6 @@ function spin {
OnInit:
.sex = G_OTHER;
.distance = 4;
- end;
-
-
+ end;
}