Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- From 1b0ddb82d4ec8b3a24f32af1d34bf8d8b5ea8f51 Mon Sep 17 00:00:00 2001
- From: Coffee <coffee@coffee-EP45-UD3L.(none)>
- Date: Sat, 2 Jul 2011 11:02:55 -0300
- Subject: [PATCH] First try at a new fight for the evil obelisk. Only a test version.
- ---
- world/map/npc/018-1/_import.txt | 1 +
- world/map/npc/018-1/_warps.txt | 2 +-
- world/map/npc/018-1/in.txt | 34 ++++++++++++
- world/map/npc/018-3/_import.txt | 1 +
- world/map/npc/018-3/_warps.txt | 2 +-
- world/map/npc/018-3/evil-obelisk.txt | 100 +++++++++++++++++++++++++++++++---
- world/map/npc/018-3/out.txt | 29 ++++++++++
- 7 files changed, 160 insertions(+), 9 deletions(-)
- create mode 100644 world/map/npc/018-1/in.txt
- create mode 100644 world/map/npc/018-3/out.txt
- diff --git a/world/map/npc/018-1/_import.txt b/world/map/npc/018-1/_import.txt
- index b3ab984..f4f3abb 100644
- --- a/world/map/npc/018-1/_import.txt
- +++ b/world/map/npc/018-1/_import.txt
- @@ -6,3 +6,4 @@ npc: npc/018-1/_warps.txt
- npc: npc/018-1/mike.txt
- npc: npc/018-1/miners.txt
- npc: npc/018-1/sword.txt
- +npc: npc/018-1/in.txt
- diff --git a/world/map/npc/018-1/_warps.txt b/world/map/npc/018-1/_warps.txt
- index 028dbd0..cdb473e 100644
- --- a/world/map/npc/018-1/_warps.txt
- +++ b/world/map/npc/018-1/_warps.txt
- @@ -1,8 +1,8 @@
- // This file is generated automatically. All manually changes will be removed when running the Converter.
- // Woodland mining camp warps
- +// I removed one of the warps manually only for testing purposes.
- 018-1.gat,79,59 warp toMine 0,-1,018-3.gat,99,132
- -018-1.gat,112,61 warp toCave -1,-1,018-3.gat,44,36
- 018-1.gat,115,40 warp toCave -1,-1,013-3.gat,22,114
- 018-1.gat,128,56 warp toCave -1,-1,018-3.gat,49,97
- 018-1.gat,90,42 warp toCave -1,-1,018-3.gat,123,164
- diff --git a/world/map/npc/018-1/in.txt b/world/map/npc/018-1/in.txt
- new file mode 100644
- index 0000000..39745b5
- --- /dev/null
- +++ b/world/map/npc/018-1/in.txt
- @@ -0,0 +1,34 @@
- +// Authors: alastrim
- +
- +018-1.gat,112,60,0 script #in 45,1,1{
- +// Maybe we should charge something for going inside to avoid people bringing tanked mules inside to get more money.
- + menu
- + "Get in.", -,
- + "Stay outside.", L_Close;
- +
- + if ($@obelisk_status == 1) end;
- + set @loop, 0;
- +
- +L_Findregister:
- + set @loop, @loop + 1;
- + if ($@obelisk_fighters$[@loop] == "") goto L_Addplayer;
- + if (@loop > $@MAX_PLAYERS_OBELISK) goto L_Full;
- + goto L_Findregister;
- + close;
- +
- +L_Addplayer:
- + set $@obelisk_fighters$[@loop], strcharinfo(0);
- + set $@obelisk_level, $@obelisk_level + Baselevel;
- + set $@obelisk_alive, $@obelisk_alive + 1;
- + warp "018-3.gat", 44, 35;
- + mes "Debug message: Array size is " + getarraysize($@obelisk_fighters$) + " and " + $@obelisk_fighters$[1] + "=1" + $@obelisk_fighters$[2] + "=2" + $@obelisk_fighters$[3] + "=3" + $@obelisk_fighters$[4] + "=4" + $@obelisk_fighters$[5] + "=5" + $@obelisk_fighters$[6] + "=6" + $@obelisk_fighters$[7] + "=7" + $@obelisk_fighters$[8] + "=8" + $@obelisk_fighters$[9] + "=9" + $@obelisk_fighters$[10] + "=10";
- + close;
- +
- +L_Full:
- + message strcharinfo(0), "It is full of people!";
- + close;
- +
- +L_Close:
- + close;
- +
- +}
- diff --git a/world/map/npc/018-3/_import.txt b/world/map/npc/018-3/_import.txt
- index 53391a0..77ece0f 100644
- --- a/world/map/npc/018-3/_import.txt
- +++ b/world/map/npc/018-3/_import.txt
- @@ -6,3 +6,4 @@ npc: npc/018-3/_warps.txt
- npc: npc/018-3/bookcase.txt
- npc: npc/018-3/evil-obelisk.txt
- npc: npc/018-3/sword.txt
- +npc: npc/018-3/out.txt
- diff --git a/world/map/npc/018-3/_warps.txt b/world/map/npc/018-3/_warps.txt
- index a4450b3..a813252 100644
- --- a/world/map/npc/018-3/_warps.txt
- +++ b/world/map/npc/018-3/_warps.txt
- @@ -1,8 +1,8 @@
- // This file is generated automatically. All manually changes will be removed when running the Converter.
- // Cave warps
- +// I removed one of the warps manually only for testing purposes.
- 018-3.gat,100,133 warp toOutside 0,-1,018-1.gat,78,60
- -018-3.gat,44,37 warp toOutside -1,-1,018-1.gat,112,62
- 018-3.gat,49,98 warp toOutside -1,-1,018-1.gat,128,57
- 018-3.gat,123,165 warp toOutside -1,-1,018-1.gat,90,43
- 018-3.gat,70,104 warp toOutside -1,-1,018-1.gat,69,55
- diff --git a/world/map/npc/018-3/evil-obelisk.txt b/world/map/npc/018-3/evil-obelisk.txt
- index 4893cfe..361f06b 100644
- --- a/world/map/npc/018-3/evil-obelisk.txt
- +++ b/world/map/npc/018-3/evil-obelisk.txt
- @@ -1,10 +1,96 @@
- -//
- +// Authors: alastrim
- 018-3.gat,67,28,0 script Evil Obelisk 185, {
- - callfunc "ClearVariables";
- - set @map$, "018-3.gat";
- - set @x, 67;
- - set @y, 28;
- - callfunc "EvilObelisk";
- - close;
- +// To do: Add a nosave flag, so you cannot relog inside the cave. But it would probably require transfering the obelisk cave to another map, since 018-3 map has other uses.
- + mes "[Evil Obelisk]";
- + mes "(A mystical aura surrounds this stone. It seems to crave money.)";
- + next;
- +
- + menu
- + "Pay it x gold", L_Start,
- + "Don't pay it anything.", -;
- + close;
- +
- +L_Start:
- +// Change to the minimum amount of players later
- + if ($@obelisk_alive <= 1) goto L_Fewplayers;
- + set $@x1, 20;
- + set $@y1, 20;
- + set $@x2, 77;
- + set $@y2, 37;
- + set $@obelisk_status, 1;
- + set $@obelisk_round, 1;
- + close2;
- + goto L_Summon;
- +
- +L_Summon:
- +// This is just a test. We have to think about a way to make it increasingly difficult to avoid people using it to get rich.
- + areamonster "018-3.gat",$@x1,$@y1,$@x2,$@y2,"Evil",1008,5*$@obelisk_alive,"Evil Obelisk::OnMobDeath";
- + startnpctimer;
- + setnpctimer 0;
- + end;
- +
- +OnMobDeath:
- + end;
- +
- +OnTimer10000:
- + set $@obelisk_round, $@obelisk_round + 1;
- + set $@obelisk_loop, 0;
- + set $@obelisk_alive, 0;
- +
- +L_Findregister:
- + set $@obelisk_loop, $@obelisk_loop + 1;
- + if ($@obelisk_fighters$[$@obelisk_loop] != "") goto L_Rewardplayer;
- + if ($@obelisk_loop > $@MAX_PLAYERS_OBELISK) goto L_Checkfightstate;
- + goto L_Findregister;
- + end;
- +
- +L_Rewardplayer:
- + if (isloggedin(getcharid(3,$@obelisk_fighters$[$@obelisk_loop]))==0) goto L_Findregister;
- + set $@obelisk_alive, $@obelisk_alive + 1;
- + attachrid(getcharid(3,$@obelisk_fighters$[$@obelisk_loop]));
- + message strcharinfo(0), "Debug message: In every round each player gain some money...";
- + set Zeny, Zeny + 50;
- + detachrid;
- + goto L_Findregister;
- +
- +L_Checkfightstate:
- + if ($@obelisk_alive < 1) goto L_Clean;
- +
- +L_Chooseone:
- + set $@Thechosen, rand(1, $@obelisk_alive);
- + if (isloggedin(getcharid(3,$@obelisk_fighters$[$@Thechosen]))==0) goto L_Chooseone;
- + attachrid(getcharid(3,$@obelisk_fighters$[$@Thechosen]));
- + message strcharinfo(0), "Debug message: In every round the script select a random player and summons the monster right next to him. This time you are the chosen one... :D ";
- + set $@x1, getx(0)-2;
- + set $@y1, gety(0)-2;
- + set $@x2, $@x1 + 4;
- + set $@y2, $@y1 + 4;
- + goto L_Summon;
- + end;
- +
- +L_Fewplayers:
- + mes "Nothing happens.";
- + close;
- +
- +L_Clean:
- + killmonster "018-3.gat","Evil Obelisk::OnMobDeath";
- + set $@obelisk_status, 0;
- + set $@obelisk_round, 0;
- + set $@obelisk_alive, 0;
- + set $@obelisk_loop, 0;
- + set $@obelisk_level, 0;
- + set $@x1, 0;
- + set $@y1, 0;
- + set $@x2, 0;
- + set $@y2, 0;
- + cleararray $@obelisk_fighters$,0,$@MAX_PLAYERS_OBELISK;
- + stopnpctimer;
- + setnpctimer 0;
- + end;
- +
- +OnInit:
- + set $@MAX_PLAYERS_OBELISK, 10;
- + initnpctimer;
- + stopnpctimer;
- }
- diff --git a/world/map/npc/018-3/out.txt b/world/map/npc/018-3/out.txt
- new file mode 100644
- index 0000000..906dc5c
- --- /dev/null
- +++ b/world/map/npc/018-3/out.txt
- @@ -0,0 +1,29 @@
- +// Author: alastrim
- +
- +018-3.gat,44,38,0 script #out 45,1,1{
- +
- + menu
- + "Get out.", -,
- + "Stay inside.", L_Close;
- +
- + if ($@obelisk_status == 1) end;
- + set @loop, 0;
- +
- +L_Findregister:
- + set @loop, @loop + 1;
- + if ($@obelisk_fighters$[@loop] == strcharinfo(0)) goto L_Removeplayer;
- + if (@loop > $@MAX_PLAYERS_OBELISK) goto L_Close;
- + goto L_Findregister;
- +
- +L_Removeplayer:
- + set $@obelisk_level, $@obelisk_level - Baselevel;
- + set $@obelisk_fighters$[@loop], "";
- + set $@obelisk_alive, $@obelisk_alive - 1;
- + warp "018-1.gat", 112, 63;
- + mes "Debug message: Array size is " + getarraysize($@obelisk_fighters$) + " and " + $@obelisk_fighters$[1] + "=1" + $@obelisk_fighters$[2] + "=2" + $@obelisk_fighters$[3] + "=3" + $@obelisk_fighters$[4] + "=4" + $@obelisk_fighters$[5] + "=5" + $@obelisk_fighters$[6] + "=6" + $@obelisk_fighters$[7] + "=7" + $@obelisk_fighters$[8] + "=8" + $@obelisk_fighters$[9] + "=9" + $@obelisk_fighters$[10] + "=10";
- + close;
- +
- +L_Close:
- + close;
- +
- +}
- --
- 1.7.4.1
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement