summaryrefslogtreecommitdiff
path: root/world/map
diff options
context:
space:
mode:
authorJessica Tölke <jtoelke@mail.upb.de>2012-08-26 10:59:57 +0200
committerJessica Tölke <jtoelke@mail.upb.de>2012-08-28 09:40:31 +0200
commit9cf96d32bc0a569b9f8c437df8776932e968d21d (patch)
tree8d22076d16b86ec6e67f3fdf6c4c09c3ea23cfd3 /world/map
parent7898cc8496d8911125efab48b3dd892c48670a4c (diff)
downloadclassic-serverdata-9cf96d32bc0a569b9f8c437df8776932e968d21d.tar.gz
classic-serverdata-9cf96d32bc0a569b9f8c437df8776932e968d21d.tar.bz2
classic-serverdata-9cf96d32bc0a569b9f8c437df8776932e968d21d.tar.xz
classic-serverdata-9cf96d32bc0a569b9f8c437df8776932e968d21d.zip
PvPEvent: Make it possible to choose the amount of money.
Diffstat (limited to 'world/map')
-rw-r--r--world/map/npc/009-6/brodomir.txt32
1 files changed, 20 insertions, 12 deletions
diff --git a/world/map/npc/009-6/brodomir.txt b/world/map/npc/009-6/brodomir.txt
index 3d9d6b35..d78e515a 100644
--- a/world/map/npc/009-6/brodomir.txt
+++ b/world/map/npc/009-6/brodomir.txt
@@ -1,5 +1,5 @@
// Last Man Standing PvP Event NPC
-// Author: tux9th
+// Authors: tux9th, Jenalya
// many thanks to Jenalaya, o11c, Ablu :)
// CAVE: this script requires a patch by o11c that makes it possible for
// getareausers to check if players are alive or dead.
@@ -13,7 +13,10 @@
// $@BRODOMIR_PLAYERS: number of players taking part in the event
+// $@BRODOMIR_MONEY: Amount of money given by the sponsor
+
009-6.gat,36,40,0|script|Brodomir|116,{
+ set @brodomir_money, 0;
if ($@BRODOMIR_PVP_STATUS == 2)
goto L_Alreadystarted;
if ($@BRODOMIR_PVP_STATUS == 1)
@@ -39,21 +42,17 @@ L_Longtalk:
mes "\"When my shelter was no longer required I started to wander around. Now I ended up here old and wrinkly. I'm only able to drive away those weak creatures who try to enter my home all the time. Slowly they learn to leave me alone or I'll squish them.\"";
next;
mes "\"I am sorry but I cannot teach you anything anymore. I am too old. But I am still quite good with my pickaxe and I made a cave where you can fight against your friends.\"";
- mes "\"The only things you need are 5000GP and two of your friends. If you pay me I will give you about five minutes and after that I will bring you to the cave where you can fight. I will reward the winner. Do you want to give it a shot?\"";
+ mes "\"The only things you need is to sponsor some price money and at least two of your friends. If you pay me I will give you about five minutes and after that I will bring you to the cave where you can fight. I will reward the winner. Do you want to give it a shot?\"";
goto L_Menu;
L_Shorttalk:
- mes "Well... I'm sorry I cannot remember. I'm old. I hope you can forgive me. Well then. Do you want to fight with your friends in my cave? All you need are 5000GP and at least two of your friends.";
+ mes "Well... I'm sorry I cannot remember. I'm old. I hope you can forgive me. Well then. Do you want to fight with your friends in my cave? All you need is to sponsor some price money and at least two of your friends.";
goto L_Menu;
L_Menu:
menu
"No.", L_Exit,
- "Yes.", -;
- if (Zeny < 5000)
- goto L_NotEnoughMoney;
- if (Zeny >= 5000)
- goto L_Pay;
+ "Yes.", L_Pay;
L_Exit:
mes "[Brodomir]";
@@ -61,17 +60,24 @@ L_Exit:
goto L_Close;
L_Pay:
+ mes "[Brodomir]";
+ mes "\"How much money do you want to sponsor as price?\"";
+ input @brodomir_money;
if ($@BRODOMIR_PVP_STATUS == 1)
goto L_Wait;
if (getareausers("009-6.gat", 20, 20, 80, 80, 1) < 3)
goto L_NotEnoughPlayers;
- if (Zeny >= 5000)
- goto L_Go;
+ if (Zeny < @brodomir_money)
+ goto L_NotEnoughMoney;
+ set Zeny, Zeny - @brodomir_money;
+ goto L_Go;
L_Go:
- set Zeny, Zeny - 5000;
+ set $@BRODOMIR_MONEY, @brodomir_money;
set $@BRODOMIR_PVP_STATUS, 1;
mapannounce "009-6.gat", "In 5 minutes I will bring you all to the PvP cave. If there are less than 3 players here the event will not start.", 0;
+ if ($@BRODOMIR_MONEY > 0)
+ mapannounce "009-6.gat", "The winner will receive " + $@BRODOMIR_MONEY + "GP and additionally 150GP per player.", 0;
mes "[Brodomir]";
mes "\"In 5 minutes I will bring you all to the PvP cave. If there are less than 3 players here the event will not start and your money will be lost.\"";
set $@BRODOMIR_START_TIME, gettimetick(2) + 300;
@@ -119,7 +125,8 @@ onReward:
if (isdead())
end;
message strcharinfo(0), "Congratulations you won!";
- set Zeny, Zeny + (5000 + 150 * $@BRODOMIR_PLAYERS);
+ set Zeny, Zeny + ($@BRODOMIR_MONEY + 150 * $@BRODOMIR_PLAYERS);
+ set $@BRODOMIR_MONEY, 0;
set $@BRODOMIR_PLAYERS, 0;
end;
@@ -150,5 +157,6 @@ L_Cleanup:
end;
L_Close:
+ set @brodomir_money, 0;
close;
}