Author Topic: War script or get player level from script.  (Read 1237 times)

0 Members and 1 Guest are viewing this topic.

Offline Twin Dragons

War script or get player level from script.
« on: January 16, 2014, 06:35:36 pm »
Pretty self explanatory any help would be appreciated
Realms Of Khaos
A Realm Amidst Khaos

---

Bubbles! Oh come on Sharon! I'm tigering Ozzy Osbourne, I'm the Prince of tigering Darkness. Evil! Evil! What's tigering evil about a wolfload of bubbles!?
- Ozzy Osbourne

Offline Mickey Kudlo

Re: War script or get player level from script.
« Reply #1 on: January 17, 2014, 10:26:18 am »
What do you mean by war script? That could be a bunch of different things.

PlayerLevel <UUID>, <varLevel>
You may have conquered my worlds, but I destroyed them!

Offline Twin Dragons

Re: War script or get player level from script.
« Reply #2 on: January 17, 2014, 02:52:00 pm »
thanks....trying to make a siege script thought i had one somewhere but i musta misplaced it
Realms Of Khaos
A Realm Amidst Khaos

---

Bubbles! Oh come on Sharon! I'm tigering Ozzy Osbourne, I'm the Prince of tigering Darkness. Evil! Evil! What's tigering evil about a wolfload of bubbles!?
- Ozzy Osbourne

Offline Mickey Kudlo

Re: War script or get player level from script.
« Reply #3 on: January 17, 2014, 03:45:38 pm »
Here are the siege scripts I used for Crucible. Just need to change the positions and such.

Crucible_Seige_Wait.es
Code: [Select]
; crucible_seige_wait

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; wait for someone to say "start seige"
; spawn the seige_setup script

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Dim Xpos
Dim Ypos
Dim Zpos


GDim SeigeFlag

Dim UUID

Dim ChatTag

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Begin

  Let Xpos = 11
  Let Ypos = 16
  Let Zpos = 111

  Let ChatTag = GetFreeTag()

  RecordChatOn Xpos, Ypos, Zpos, 1, ChatTag

:Main_Loop1

   Wait 1

   IfPlayerChat ChatTag, Start Seige, Main_Start

   RecordChatReset ChatTag

   Goto Main_Loop1

:Main_Start

   RecordChatReset ChatTag

   IfEquals SeigeFlag, 1, Main_Running

   Let SeigeFlag = 1

   ;Global The seige on dungeon level 10 has been initiated. 2 minutes until start.

   EventStart Crucible_Seige_Setup

   Goto Main_Loop1

:Main_Running

   LocalChat Xpos, Ypos, Zpos, 5, A seige is already in progress.

   Goto Main_Loop1

End

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Crucible_seige_Setup.es
Code: [Select]
; crucible_seige_setup

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; wait for delay
; setup map
; warp players in
; spawn the seige_run script

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GDim SeigeFlag
GDim QueenTag

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Dim StartX
Dim StartY
Dim StartZ

Dim DestX
Dim DestY
Dim DestZ

Dim UUID

Dim Count

Dim PlayerCount



;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Begin

   MaxLineCount 15000

   Let SeigeFlag = 1

   Let QueenTag = GetFreeTag()

   Let StartXpos = 16
   Let StartYpos = 16
   Let StartZpos = 111

   Let DestXpos = 50
   Let DestYpos = 50
   Let DestZpos = 112

   Let Count = 2
   Let PlayerCount = 0

:Main_Loop1

   LocalChat StartXpos, StartYpos, StartZpos, 20, The seige will start in %Count% minute(s). Please stand on the green.

   Wait 3

   Let Count = Count - 1

   IfEquals Count, 0, Main_Start

   Goto Main_Loop1

:Main_Start

   Gosub SetupMap

   GoSub SetupPlayers

   IfEquals PlayerCount, 0, Main_Cancel

   LocalChat StartXpos, StartYpos, StartZpos, 20, The seige has started with %PlayerCount% players!

   LocalChat DestXpos, DestYpos, DestZpos, 50, The seige has started with %PlayerCount% players! Protect the Queen!

   EventStart Crucible_Seige_Run

   End

:Main_Cancel

   LocalChat StartXpos, StartYpos, StartZpos, 20, The seige was cancelled.

   Let SeigeFlag = 0

End

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sub SetupMap

   MonsterAdd Queen Alyssa, DestXpos, DestYpos, DestZpos, 1, QueenTag

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Sub SetupPlayers

   Let PlayerCount = 0

:Setup_Loop1

   IfNotPlayerNear Startx, StartY, StartZ, 2, Setup_Exit

   Let UUID = GetNearestPlayer()

   WarpPlayer UUID, DestX, DestY, DestZ

   Let PlayerCount = PlayerCount + 1

   Goto Setup_Loop1
     
:Setup_Exit   

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Crucible_Seige_Run.es
Code: [Select]
; crucible_seige_run

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

; set monster type
; add monsters
; etc

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

GDim SeigeFlag

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Dim QueenTag

Dim State

Dim Xpos
Dim Ypos
Dim Zpos

Dim UUID

Dim Count

Dim MonsterLevel

Dim MonsterID

Dim MonsterTag

Dim SpawnXpos
Dim SpawnYpos

Dim TimeLimit

Dim ExitXpos
Dim ExitYpos
Dim ExitZpos

Dim SuccessXpos
Dim SuccessYpos
Dim SuccessZpos

Dim ItemTag


;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Begin

   MaxLineCount 15000

   Let Xpos = 50
   Let Ypos = 50
   Let Zpos = 112

   Let ExitXpos = 8
   Let ExitYpos = 8
   Let ExitZpos = 111

   Let SuccessXpos = 15
   Let SuccessYpos = 5
   Let SuccessZpos = 111

   Let State = 0

   Let MonsterLevel = -1

   Let MonsterTag = GetFreeTag()

   Let ItemTag = GetFreeTag()

   Let TimeLimit = 60

   Let QueenTag = GetFreeTag()

   MonsterAquire Queen Alyssa, QueenTag

:Main_Loop1
   
   IfEquals State, 0, @State0

   IfEquals State, 1, @State1

   IfEquals State, 2, @State2

   IfEquals State, 3, @State3

   IfEquals State, 4, @State4

   IfEquals State, 5, @State5


   IfEquals State, 10, @State10
 

   Goto Main_Loop1

End

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sub State0

   Wait 3

   Let State = 1

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


Sub State1

   GoSub GetSpawnSpot

   GoSub GetMonster

   IfEquals State, 10, State1_10

   MonsterAdd %MonsterID%, SpawnXpos, SpawnYpos, Zpos, 30, MonsterTag


   Let MonsterLevel = MonsterLevel - 1

   GoSub GetSpawnSpot

   GoSub GetMonster

   MonsterAdd %MonsterID%, SpawnXpos, SpawnYpos, Zpos, 30, MonsterTag


   MonsterGoto MonsterTag, Xpos, Ypos

   Let State = 2

   Return

:State1_10

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sub GetSpawnSpot

   Let SpawnXpos = Xpos - 40
   Let SpawnYpos = Ypos

   MinRnd 1
   MaxRnd 4
   
   Let Count = RND()

   IfEquals Count, 1, GetSpawnSpot_1
   IfEquals Count, 2, GetSpawnSpot_2
   IfEquals Count, 3, GetSpawnSpot_3
   IfEquals Count, 4, GetSpawnSpot_4

   Return

:GetSpawnSpot_1

   Let SpawnXpos = Xpos - 40
   Let SpawnYpos = Ypos
     
   Return


:GetSpawnSpot_2

   Let SpawnXpos = Xpos + 40
   Let SpawnYpos = Ypos
     
   Return

:GetSpawnSpot_3

   Let SpawnXpos = Xpos
   Let SpawnYpos = Ypos - 40
     
   Return

:GetSpawnSpot_4

   Let SpawnXpos = Xpos
   Let SpawnYpos = Ypos + 40
     
EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sub GetMonster

   Let MonsterLevel = MonsterLevel + 1

   Let MonsterID = 0
 
   IfEquals MonsterLevel, 0, GetMonster_0
   IfEquals MonsterLevel, 1, GetMonster_1
   IfEquals MonsterLevel, 2, GetMonster_2
   IfEquals MonsterLevel, 3, GetMonster_3
   IfEquals MonsterLevel, 4, GetMonster_4
   IfEquals MonsterLevel, 5, GetMonster_5
   IfEquals MonsterLevel, 6, GetMonster_6
   IfEquals MonsterLevel, 7, GetMonster_7
   IfEquals MonsterLevel, 8, GetMonster_8
   IfEquals MonsterLevel, 9, GetMonster_9

   Return

:GetMonster_0

   ; squire
   Let MonsterID = 355

   Return

:GetMonster_1

   ; crossbowman
   Let MonsterID = 367

   Return

:GetMonster_2

   ; wicken
   Let MonsterID = 379

   Return

:GetMonster_3

   ; warmonger
   Let MonsterID = 412

   Return

:GetMonster_4

   ; elite squire
   Let MonsterID = 356

   Return

:GetMonster_5

   ; elite crossbowman
   Let MonsterID = 368

   Return

:GetMonster_6

   ; elite wicken
   Let MonsterID = 380

   Return

:GetMonster_7

   ; buzzard
   Let MonsterID = 413

   Return

:GetMonster_8

   ; asp
   Let MonsterID = 415

   Return

:GetMonster_9

   Let State = 10

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sub State2

:State2_Loop1

   Wait 3

   IfNotMonsterExist QueenTag, State2_QueenDead

   IfNotMonsterExist MonsterTag, State2_MonsterDead


   PlayerCount Xpos, Ypos, Zpos, 60, Count

   IfEquals Count, 0, State2_PlayerDead   


   Let TimeLimit = TimeLimit - 1

   IfEquals TimeLimit, 0, State2_TimeOut

   LocalChat Xpos, Ypos, Zpos, 60, %TimeLimit% minute(s) remaining in siege.


   IfMonsterAT MonsterTag, Xpos, Ypos, 5, State2_QueenDanger

   Goto State2_Loop1

:State2_QueenDanger

   MonsterChat QueenTag, HELP!!!!

   Goto State2_Loop1   

:State2_TimeOut

   Let State = 3

   Return

:State2_QueenDead   

   Let State = 4

   Return

:State2_MonsterDead

   Let State = 0

   Return

:State2_PlayerDead

   Let State = 5

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sub State3
   
   ; timeout

   LocalChat Xpos, Ypos, Zpos, 60, You have run out of time and failed!

:State3_Loop1

   IfNotPlayerNear Xpos, Ypos, Zpos, 60, State3_Exit

   Let UUID = GetNearestPlayer()

   WarpPlayer UUID, ExitXpos, ExitYpos, ExitZpos

   Goto State3_Loop1

:State3_Exit

   MonsterRemove MonsterTag
   MonsterRemove QueenTag

   Let SeigeFlag = 0

   End

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sub State4
   
   ; queen dead

   LocalChat Xpos, Ypos, Zpos, 60, The Queen has been slain! You have failed!

:State4_Loop1

   IfNotPlayerNear Xpos, Ypos, Zpos, 60, State4_Exit

   Let UUID = GetNearestPlayer()

   WarpPlayer UUID, ExitXpos, ExitYpos, ExitZpos

   Goto State4_Loop1

:State4_Exit

   MonsterRemove MonsterTag

   Let SeigeFlag = 0

   End

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sub State5
   
   ; players dead

   LocalChat ExitXpos, ExitYpos, ExitZpos, 30, All the players have either died or fleed!

   MonsterRemove MonsterTag
   MonsterRemove QueenTag
   Let SeigeFlag = 0

   End

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;

Sub State10
   
   ; complete, success

   LocalChat Xpos, Ypos, Zpos, 60, You have successfully defended the Queen!

:State10_Loop1

   IfNotPlayerNear Xpos, Ypos, Zpos, 60, State10_Exit

   Let UUID = GetNearestPlayer()

   ItemAdd Gravyn Trophy, 0, 0, 112, 1, ItemTag, TRUE

   ItemGive ItemTag, UUID

   WarpPlayer UUID, SuccessXpos, SuccessYpos, SuccessZpos

   Goto State10_Loop1

:State10_Exit

   MonsterRemove QueenTag

   Let SeigeFlag = 0

   End

EndSub

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
You may have conquered my worlds, but I destroyed them!

Offline Twin Dragons

Re: War script or get player level from script.
« Reply #4 on: January 20, 2014, 03:37:56 am »
sweet thanks that helps a bunch
Realms Of Khaos
A Realm Amidst Khaos

---

Bubbles! Oh come on Sharon! I'm tigering Ozzy Osbourne, I'm the Prince of tigering Darkness. Evil! Evil! What's tigering evil about a wolfload of bubbles!?
- Ozzy Osbourne

 

Related Topics

  Subject / Started by Replies Last post
11 Replies
1758 Views
Last post February 12, 2007, 05:08:28 am
by Baups
5 Replies
1057 Views
Last post November 21, 2006, 01:22:39 pm
by Pirate Wings
Level Caps

Started by yeahs « 1 2 3 4 » RPGWO V4 / V5

63 Replies
5864 Views
Last post May 05, 2012, 10:15:11 am
by Tokoshoran
9 Replies
1691 Views
Last post May 01, 2012, 09:21:04 am
by Novibear
10 Replies
4501 Views
Last post January 15, 2017, 11:22:02 pm
by doomkitten666