Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- --The name of this quest.
- _name = "Champion of the Arena"
- --A description of this quest and its completion criteria
- _description = "Compete for the prize of Champion of the Arena"
- --Ran when the player attempts to begin a quest
- --Return true when the player can successfully begin
- --Return false when they cannot (E.G. Not high enough level)
- function BeginQuest()
- return true
- end
- --Ran when the player abandons a quest
- function AbandonQuest()
- end
- --Ran every second to test whether a player has completed a quest
- --Return true if the quest is complete
- --Return false if the quest is incomplete
- function IsQuestComplete()
- --Check the player is in the middle of the arena
- if (_x >= 49 and _x <=73 and _y >=50 and _y <=74 and _map == 14) then
- --Find how long the player has been in the arena (in seconds)
- player_time = GetTracker("time")
- if (player_time == 0) then
- _local_system_message = _name .. " has joined the battle for Champion of the Arena."
- end
- if (player_time == 24) then
- _local_system_message = _name .. " will become Champion of the Arena in 1 minute!"
- end
- if (player_time == 27) then
- _local_system_message = _name .. " will become Champion of the Arena in 30 seconds!"
- end
- if (player_time == 29) then
- _local_system_message = _name .. " will become Champion of the Arena in 10 seconds!"
- end
- if (player_time == 30) then
- return true
- end
- --Add another second to the players arena time
- SetTracker("time", player_time + 1)
- end
- return false
- end
- --Ran when a player attempts to complete a quest
- --Return true if the quest completion code was succesful
- --Return false if it was not (E.G. bag was full)
- function CompleteQuest()
- _local_system_message = _name .. " is Champion of the Arena!"
- --Give them a cup of champion (item 205) if they don't already have one
- if (BagCount(205) == 0) then
- AddItemToBag(205)
- end
- --Move player to karend temple if they win
- _x = 46
- _y = 43
- _map = 18
- _fail_message = "You are the Champion of the Arena!"
- --Start a new game
- ResetTracker()
- end
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement