summaryrefslogtreecommitdiff
path: root/npc
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-05-29 10:47:12 -0300
committerJesusaves <cpntb1@ymail.com>2018-05-29 10:58:47 -0300
commit9e799c1ac640becba8e286085faf90bde74e77bd (patch)
tree4a5b45e3ad848ca53c3fdc564bb555e7f8bec8a8 /npc
parent738ec7e26c79eec413ea34f8684fa98aca66aee2 (diff)
downloadserverdata-9e799c1ac640becba8e286085faf90bde74e77bd.tar.gz
serverdata-9e799c1ac640becba8e286085faf90bde74e77bd.tar.bz2
serverdata-9e799c1ac640becba8e286085faf90bde74e77bd.tar.xz
serverdata-9e799c1ac640becba8e286085faf90bde74e77bd.zip
Try to simplify Ishi
Diffstat (limited to 'npc')
-rw-r--r--npc/003-1/ishi.txt45
1 files changed, 23 insertions, 22 deletions
diff --git a/npc/003-1/ishi.txt b/npc/003-1/ishi.txt
index 4ab99b7aa..a38ea4e5d 100644
--- a/npc/003-1/ishi.txt
+++ b/npc/003-1/ishi.txt
@@ -15,12 +15,13 @@
close;
}
+ @mpq_cost=(BaseLevel ** 2);
- if (Mobpt < BaseLevel ** 2)
+ if (Mobpt < @mpq_cost)
{
mesn l("Ishi, the Rewards Master");
mesq l("Welcome! I see you have @@ Monster Points. But that isn't enough to get items at your current level, sorry!", Mobpt);
- mes col(l("I need at minimum @@ Monster Points to get items at current level.",BaseLevel ** 2),9);
+ mes col(l("I need at minimum @@ Monster Points to get items at current level.",@mpq_cost),9);
close;
}
@@ -38,17 +39,17 @@
do
{
select
- rif(Mobpt >= BaseLevel ** 2,l("1")),
- rif(Mobpt >= (BaseLevel ** 2)*2,l("2")),
- rif(Mobpt >= (BaseLevel ** 2)*3,l("3")),
- rif(Mobpt >= (BaseLevel ** 2)*4,l("4")),
- rif(Mobpt >= (BaseLevel ** 2)*5,l("5")),
- rif(Mobpt >= (BaseLevel ** 2)*6,l("6")),
- rif(Mobpt >= (BaseLevel ** 2)*7,l("7")),
- rif(Mobpt >= (BaseLevel ** 2)*8,l("8")),
- rif(Mobpt >= (BaseLevel ** 2)*9,l("9")),
- rif(Mobpt >= (BaseLevel ** 2)*10,l("10")),
- rif(Mobpt >= (BaseLevel ** 2)*11,l("Gimme as many as I deserve!")),
+ rif(Mobpt >= @mpq_cost,l("1")),
+ rif(Mobpt >= (@mpq_cost)*2,l("2")),
+ rif(Mobpt >= (@mpq_cost)*3,l("3")),
+ rif(Mobpt >= (@mpq_cost)*4,l("4")),
+ rif(Mobpt >= (@mpq_cost)*5,l("5")),
+ rif(Mobpt >= (@mpq_cost)*6,l("6")),
+ rif(Mobpt >= (@mpq_cost)*7,l("7")),
+ rif(Mobpt >= (@mpq_cost)*8,l("8")),
+ rif(Mobpt >= (@mpq_cost)*9,l("9")),
+ rif(Mobpt >= (@mpq_cost)*10,l("10")),
+ rif(Mobpt >= (@mpq_cost)*11,l("Gimme as many as I deserve!")),
l("Sorry, I have to go now.");
switch (@menu)
@@ -111,17 +112,17 @@ L_Close:
close;
L_Items:
- debugmes "Reaching item loop";
+ //debugmes "Reaching item loop";
for (.@i = 0; .@i < @var; .@i ++)
{
- debugmes "Items: "+str(@var);
+ //debugmes "Items: "+str(@var);
.@lucked=0;
.@reward$="";
getinventorylist;
if (@inventorylist_count == 100)
goto L_NoPlace;
- debugmes "Testing rares";
+ //debugmes "Testing rares";
@lucky = rand(10000) + 1;
for (.@b = 0; .@b < getarraysize(@Rares$); .@b=.@b+2) {
debugmes "Checking "+@Rares$[.@b]+" - b is now "+.@b;
@@ -136,20 +137,20 @@ L_Items:
@control = @control + atoi(@Rares$[.@b+1]);
}
- debugmes "Setting reward"; // could be if (!.@lucked) but for sanity...
+ //debugmes "Setting reward"; // could be if (!.@lucked) but for sanity...
if (.@reward$ == "")
set .@reward$, @Items$[rand(getarraysize(@Items$))];
- debugmes "Check weight";
+ //debugmes "Check weight";
.@weight = checkweight(.@reward$,1);
if (!.@weight)
goto L_NoPlaceWeight;
- debugmes "Processing...";
- Mobpt = Mobpt - BaseLevel ** 2;
+ //debugmes "Processing...";
+ Mobpt = Mobpt - @mpq_cost;
getitem .@reward$,1;
- debugmes "Printing...";
+ //debugmes "Printing...";
if (.@lucked) {
mes "";
mes l("Wow!");
@@ -191,7 +192,7 @@ L_NoPlaceWeight :
close;
L_Give_all:
- @var = Mobpt / BaseLevel ** 2;
+ @var = Mobpt / @mpq_cost;
if (@var > 50) { // limit to avoid lag server. Probably a bad idea.
@var = 50;
mes l("You have too much points. I can't allow you to take all at once right now. I'll try to give you 50, and you come back later!");