summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJesusaves <cpntb1@ymail.com>2018-03-11 16:26:46 -0300
committerJesusaves <cpntb1@ymail.com>2018-03-11 16:26:46 -0300
commit31ae93eec9d256c7d3d7ec7fc533f0cb08889e2d (patch)
tree6b5c489ae8533bf569cf493563d991767acc7839
parentb7bff532e4fb3faa4465cfff1c95cb941a4d1929 (diff)
downloadserverdata-31ae93eec9d256c7d3d7ec7fc533f0cb08889e2d.tar.gz
serverdata-31ae93eec9d256c7d3d7ec7fc533f0cb08889e2d.tar.bz2
serverdata-31ae93eec9d256c7d3d7ec7fc533f0cb08889e2d.tar.xz
serverdata-31ae93eec9d256c7d3d7ec7fc533f0cb08889e2d.zip
Mob points system, specially adapted from TMW-2 for Evol
-rw-r--r--npc/001-1/aidan.txt78
-rw-r--r--npc/001-1/ishi.txt209
-rw-r--r--npc/functions/mobpoint.txt25
3 files changed, 312 insertions, 0 deletions
diff --git a/npc/001-1/aidan.txt b/npc/001-1/aidan.txt
new file mode 100644
index 00000000..af46e837
--- /dev/null
+++ b/npc/001-1/aidan.txt
@@ -0,0 +1,78 @@
+// TMW-2 Script
+// Author: Crazyfefe, Jesusalva
+// Desc: Originally a Tmw script
+
+003-1,95,97,0 script Aidan NPC_PLAYER,{
+
+ function Register
+ {
+ mesn l("Aidan, the Monster Guide");
+ mesq l("Oh my, you don't seem to be registered as a Monster Hunting Quest Participant. Would you like to register?");
+
+ do
+ {
+ select
+ l("Register"),
+ l("Not at the moment"),
+ l("Information");
+
+ switch (@menu)
+ {
+ case 1:
+ mes "";
+ MPQUEST=1;
+ mesn l("Aidan, the Monster Guide");
+ mesq l("Give me a second to look over your paperwork.");
+ next;
+ mesn l("Aidan, the Monster Guide");
+ mes l("\"Well, looks like you qualify!");
+ mes l("Welcome to the questing world!\"");
+ close;
+ break;
+ case 2:
+ mes "";
+ mesn l("Aidan, the Monster Guide");
+ mesq l("Very well, you don't know what you're missing.");
+ close;
+ break;
+ case 3:
+ mes "";
+ mesn l("Aidan, the Monster Guide");
+ mesq l("Monsters have been running rampant. If they grow too much in numbers, cities may be overrun.");
+ next;
+ mesn l("Aidan, the Monster Guide");
+ mesq l("Therefore, the Legion created a system so when you kill a monster, depending on its strength, you'll get Monster Points.");
+ next;
+ mesn l("Aidan, the Monster Guide");
+ mesq l("You can then exchange those points for awesome items!");
+ next;
+ mesn l("Aidan, the Monster Guide");
+ mesq l("So whaddaya say, sign up won't you?");
+ next;
+ mes "";
+ Register;
+ break;
+ }
+ } while (@menu != 2);
+ }
+
+ if (MPQUEST == 0)
+ Register;
+
+ mesn l("Aidan, the Monster Guide");
+ mesq l("You currently have @@ Monster Points. These points are acquired while killing monsters.", Mobpt);
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ //setunitdata(.@npcId, UDT_HEADTOP, 2929);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, 1305);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, 2201);
+ setunitdata(.@npcId, UDT_WEAPON, 1800); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 3);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 3);
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
diff --git a/npc/001-1/ishi.txt b/npc/001-1/ishi.txt
new file mode 100644
index 00000000..094ba80e
--- /dev/null
+++ b/npc/001-1/ishi.txt
@@ -0,0 +1,209 @@
+// TMW-2 Script
+// Author:
+// Crazyfefe
+// Jesusalva
+//
+// Do not add void items to array.
+// note : the rare item system suck.
+
+003-1,97,97,0 script Ishi NPC_PLAYER,{
+
+ if (MPQUEST == 0)
+ {
+ mesn l("Ishi, the Rewards Master");
+ mesq l("Hey, it seems like you didn't register as a Monster Hunting Quest participant yet! You can sign up with Aidan.");
+ close;
+ }
+
+
+ if (Mobpt < BaseLevel ** 2)
+ {
+ mesn l("Ishi, the Rewards Master");
+ mesq l("Welcome! I see you have @@ Monster Points. But that isn't enough to get items, sorry!", Mobpt);
+ close;
+ }
+
+ setarray @Items$, "Croconut","Plushroom","BlueCottonDye";
+ setarray @Rares$, "BrimmedHat", 5, "LousyMoccasins", 5;
+
+ mesn l("Ishi, the Rewards Master");
+ mesq l("Welcome! I see you have @@ Monster Points. Would you like to exchange some of those for items?", Mobpt);
+ next;
+
+ 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("Give me as many as I deserve!")),
+ l("Sorry, I have to go now.");
+
+ switch (@menu)
+ {
+ case 1 :
+ @var = 1;
+ goto L_Items;
+ break;
+ case 2 :
+ @var = 2;
+ goto L_Items;
+ break;
+ case 3 :
+ @var = 3;
+ goto L_Items;
+ break;
+ case 4 :
+ @var = 4;
+ goto L_Items;
+ break;
+ case 5 :
+ @var = 5;
+ goto L_Items;
+ break;
+ case 6 :
+ @var = 6;
+ goto L_Items;
+ break;
+ case 7 :
+ @var = 7;
+ goto L_Items;
+ break;
+ case 8 :
+ @var = 8;
+ goto L_Items;
+ break;
+ case 9 :
+ @var = 9;
+ goto L_Items;
+ break;
+ case 10 :
+ @var = 10;
+ goto L_Items;
+ break;
+ case 11 :
+ goto L_Give_all;
+ break;
+ default :
+ goto L_Close;
+ break;
+ }
+ } while (@menu != 12);
+
+ closedialog;
+ goodbye;
+ close;
+
+L_Close:
+ @var =0;
+ close;
+
+L_Items:
+ for (.@i = 0; .@i < @var; .@i ++)
+ {
+ // Setup
+ .@lucked=0;
+ .@reward$="";
+ getinventorylist;
+ if (@inventorylist_count == 100)
+ goto L_NoPlace;
+
+ // Test rares
+ @lucky = rand(10000) + 1;
+ for (.@b = 0; .@b < getarraysize(@Rares$); .@b=.@b+2) {
+ if (.@b == 0)
+ @control = 0;
+ if(@lucky >= (@control + 1) && @lucky <= @control + atoi(@Rares$[.@b+1]))
+ {
+ .@lucked=1;
+ .@reward$ = @Rares$[.@b];
+ }
+ @control = @control + atoi(@Rares$[.@b+1]);
+ }
+
+ // Test reward. Could be (!.@lucked) but I thought this check would be safer
+ if (.@reward$ == "")
+ set .@reward$, @Items$[rand(getarraysize(@Items$))];
+
+ // If you don't have weight, abort NOW.
+ .@weight = checkweight(.@reward$,1);
+ if (!.@weight)
+ goto L_NoPlaceWeight;
+
+ // Reduce points and get item
+ Mobpt = Mobpt - BaseLevel ** 2;
+ getitem .@reward$,1;
+
+ // Print stuff. Special text if rare.
+ if (.@lucked) {
+ mes "";
+ mes l("Wow!");
+ mes l("I can't believe.");
+ mes l("you got lucky and got a(n) @@!", getitemlink(.@reward$));
+ mes "";
+ } else {
+ mesq l("You received one @@!", getitemlink(.@reward$));
+ }
+
+ }
+ close;
+
+L_Continue:
+ mesq l("You still have @@ Monster Points! Do you want more items?", Mobpt);
+ do
+ {
+ select
+ l("Yes"),
+ l("No");
+
+ switch (@menu)
+ {
+ case 1:
+ goto L_Give_all;
+ break;
+ case 2:
+ goto L_Close;
+ break;
+ }
+ } while (@menu != 2);
+
+L_NoPlace :
+ mesq l("You seem to run out of place, you should go to the storage.");
+ close;
+
+L_NoPlaceWeight :
+ mesq l("You can't carry more items, you should go to the storage.");
+ close;
+
+L_Give_all:
+ @var = Mobpt / BaseLevel ** 2;
+ if (@var > 30) { // limit to prevent a possible server lag.
+ @var = 30;
+ 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 30, and you come back later!");
+ next;
+ }
+
+ goto L_Items;
+ close;
+
+OnInit:
+ .@npcId = getnpcid(0, .name$);
+ //setunitdata(.@npcId, UDT_HEADTOP, 2929);
+ setunitdata(.@npcId, UDT_HEADMIDDLE, 1305);
+ setunitdata(.@npcId, UDT_HEADBOTTOM, 2201);
+ setunitdata(.@npcId, UDT_WEAPON, 1800); // Boots
+ setunitdata(.@npcId, UDT_HAIRSTYLE, 4);
+ setunitdata(.@npcId, UDT_HAIRCOLOR, 13);
+
+ .sex = G_MALE;
+ .distance = 5;
+ end;
+}
+
diff --git a/npc/functions/mobpoint.txt b/npc/functions/mobpoint.txt
new file mode 100644
index 00000000..a9d69af0
--- /dev/null
+++ b/npc/functions/mobpoint.txt
@@ -0,0 +1,25 @@
+// TMW2 Scripts
+// Author: Crazyfefe
+// Jesusalva
+// Desc: Mob Points for Aidan & Ishi. You will gain MONSTER-LEVEL mob points.
+
+function script mobpoint {
+ if (!MPQUEST) goto L_Return;
+ //if (killedrid < 1002) goto L_Return;
+
+ Mobpt = Mobpt + strmobinfo(3,killedrid);
+
+
+L_Return:
+ //set @value, 0;
+ return;
+
+}
+
+000-0,0,0,0 script #mobptsys NPC_HIDDEN,{
+ end;
+
+OnNPCKillEvent:
+ callfunc "mobpoint";
+ end;
+}