Jump to content

Night

Inactive Member
  • Posts

    839
  • Joined

  • Last visited

  • Days Won

    5
  • Feedback

    0%

Posts posted by Night

  1. first its bougth not buyed

    well it is a common this for a vps to give you what is said , nothing else

    my friend installed his server with no problem on there vps

    i did install something and they worked perfectly + eter host has there own support you should ask them as well

    or change the question to a <general case> one (just delete the eterhost part

  2. Whether or not you know him from somewhere else, he didn't do anything to you on metin2dev. Keep your personal drama personal.

     

    Calling someone retarded for asking a question makes no sense.. smart people ask questions and learn things.

     

     

    It's funny that the command I gave requires more input, it's straight from the FreeBSD site.

     

    i think that it should be like this :

    /usr/sbin/pkg update

  3. he asked a question

    even if it is easy you should at least try to help :

    well there  is a note :

    ===>  mysql55-server-5.5.39 pkg(8) must be version 1.3.8 or greater, but you have 1.2.7_1. You must upgrade pkg(8) first.
    pkg(8) should be 1.3.8 thats all

    look at this https://www.freebsd.org/doc/handbook/pkgng-intro.html

    try to run

    pkg
    first some time it does update it self if not

    do as the handbook says or install it using port master

    portmaster ports-mgmt/pkg
    • Love 2
  4. In this thread you can post the last completed anime/ manga that you watched. You can also post your favorite anime/manga and the current anime/manga that you are watching. At long last you can also share your opinion regarding an anime/manga with other or discuss about the latest news regarding anime & manga.

     

    Ex: The anime that i finished recently was No game no life and the last manga that i finished was Toukyou Kushu.

    My favourite anime ever was Guilty Crown and I'm curently watching Sword art Online II which in my opinion is not that good as the first season.

     

    Let the spam begin!

     

    lol i berly saw this

    guilty crown was a nice anime with a not bad ending so far

    it could have had way better ending

    the new episode of sao is online right now ^^

  5. make a symbolic link from maineline boost and cryptopp to /usr/local/include

    they are needed  (look at the depend file)

    or you can also upload them to the path if you dont know who to make a symbolic link on freebsd

    else you can also install boost-all

    (i included the symbolic link to cryptopp so that you will need it to complie mainline_w2.1)

    tip : to complie any game src look at the makefile first

    some part are wrong/commented or you didnt install perfectly all the needed thing for the makefile

     

    tip : there is one case where you will have to edit main.cpp so that you complie (dev/dev wolf branch) i dont rly remember

    good luck

     

    edit :

    i recommed you having maineline boost inseted of downloading it or having from boost-all port

    reason : some header file a missing

    • Love 2
  6. right now watching some of summer 2014 anime (i do watch many at the same time)

    old anime that i have watched :

    DBz-GT :

    2006-2009 i watched it in frensh about that time the full serie with 11 move it was so nice i was waiting for the new episode each day at 6 pm ^^

    even if it was long but it was never boring

    Fairy taile :

    2013 : i watch all the 175 episode in english sub-dub if they exist the anime have nice design nice story .....etc

    the episode that i liked was 122 ^^ and 174-175 .

    SAO season one :

    it was one of the anime that i would never say :boring: about them

    action,death,romence,drama.

    this anime was so cool .

    i have watched at least 100 more serie but i dont remmeber them -.-

    for now im watching :

    fairy taile 2014:

    i think that it is a nice one but they still refuse to let any charchter die yet -.- this is so boring

    SAO season2 (GGO) or even phantom bullet :

    its the best serie for this year so far

    nothing else to say

    Rokujouma no Shinryakusha!?:

    another serie that im watching not boring not bad

    kind of romantic that piss me off

    just chose idiot.

    Glasslip:

    i dont rly understand the story perfectly sence it is complicated some how

    this kind of anime i just want to get rid of them

    Ao Haru Ride:

    i think this anime piss me off too

    Seirei Tsukai no Blade Dance :

    O.o yes not bad worth watching in my opinion

    some how i dont like the "Ecchi" part

    ----------------------------------------------- back to old anime i just remmeber one that is worth watching too

    heavens lost property : one of the anime that made me lol

    from first episode

    not rly into Ecchi but kind of nice

    its an anime that i have watched 2012

    please do not watch the secound move

    cz you will hate the anime

    (it has the worst ending so far)

    school days :

    the worst anime that i have ever watched so far

    its one of the anime that you should never watch

    be carefull)

    (i didnt finsh it -- it was discusting)

    ------------------------------------------------------------------------------

    one piece :

    well it does take some place sence it is one of the best in the world

    i do watch and i did watch other anime

    i dont remmber all of them so i have nothing else to say

     

    Oops :

    i forgot naruto ^^ :

    same as SAO
     

  7. mainline has a limite time that should have expired by now

    open limite.h

    then comment/delet those line (or anything similay

    
    #define ENABLE_LIMIT_TIME
    #define GLOBAL_LIMIT_TIME 1410080571UL // Sun Sep  7 18:02:51 2014

    else in case of some weard compling error that might cz your game to give you segement fault

    try to use another ftp tool (WinSCP) first

    if this does not work then maybe a complie error (the shity make file some time)

    to know what error your error

    cd to game folder
    ./game

    im free tomorow so ask

  8.  

     

    I don't have

    int gShutdownEnable = 0;

     

    in my config.cpp im using mainline , is this for novaline only ?

    o.O this killed some devs you know x.x

    there isnt a brunch only function (maybe some function were not defined or some variable but not a function that use only basic ymir function) good luck

    for eTony nice work and could you use the code function

     

     

    I meant that this release its for novaline only , its obvious you can do it on mainline.

     

    nvm then my head is afk

    but ... nvm

  9. I don't have

    int gShutdownEnable = 0;

     

    in my config.cpp im using mainline , is this for novaline only ?

    o.O this killed some devs you know x.x

    there isnt a brunch only function (maybe some function were not defined or some variable but not a function that use only basic ymir function) good luck

    for eTony nice work and could you use the code function

  10.  

     

    What do you want to have the next version?

    Pet's can attack to the monster and other players xD

    :)) i don't think it's that easy to do, but yes, it would be awesome. But that's a whole system and doesn't have anything to do with his core.

    Anyway, it's a nice core. Good work. Add 4 inventorys to it, and make a launcher for us ;)

     

    it is hard a work to do

     

    well it is a good work ^^

    and for what some ppl want just look at vanilla core

    make one as good as that or better ^^ (one without the small bug)

    good luck and have a nice day

  11. you mean dragon lair (where the blue dragon is.)

    if thats the case there are 3 quest for this :

    quest dragon_lair begin
    	state start begin
    		when 8031.kill or 8032.kill or 8033.kill or 8034.kill begin
    			-- spawns a group of mobs at the area of the player with a chance of 1/3
    			if (math.random(3) == 1) then
    				local group_group = {
    					2425, 2425,
    					2426, 2426,
    					2427
    				}
    				local group_num = math.random(table.getn(group_group))
    				local group_vnum = group_group[group_num]
    				mob.spawn_group(group_vnum, pc.get_local_x(), pc.get_local_y(), 1, 1, 1) -- spawn a group of monsters
    			end
    		end
    	end
    end
    
    
    quest dragon_lair_access begin
    	state start begin
    
    		function get_settings()
    			local settings = {}
    			settings.cooldown_time = 3600 -- when can the dragon be killed again?
    			settings.group_time = 300 -- how long can players enter after the first one is in the dragon's lair?
    			settings.access_item = 30179 -- "Dragon God Symbols"
    			settings.dragon_vnum = 2430
    
    			settings.spawn = {}
    			settings.spawn.x = 181
    			settings.spawn.y = 173
    
    			settings.warp_in = {}
    			settings.warp_in.first = {}
    			settings.warp_in.last = {}
    			settings.warp_in.first.x = 843677
    			settings.warp_in.first.y = 1066206
    			settings.warp_in.last.x = 844027
    			settings.warp_in.last.y = 1067599
    
    			settings.warp_out = {}
    			settings.warp_out.first = {}
    			settings.warp_out.last = {}
    			settings.warp_out.first.x = 9200
    			settings.warp_out.first.y = 1206400
    			settings.warp_out.last.x = 10900
    			settings.warp_out.last.y = 1209100
    
    			settings.room_area = {}
    			settings.room_area.first = {}
    			settings.room_area.last = {}
    			settings.room_area.first.x = 833000
    			settings.room_area.first.y = 1062500
    			settings.room_area.last.x = 844100
    			settings.room_area.last.y = 1071500
    
    			settings.access_item_amount = game.get_event_flag("dragon_lair_amount")
    			if (settings.access_item_amount == 0) then
    				settings.access_item_amount = 3 -- default value when event flag is not set
    			elseif (settings.access_item_amount == -1) then
    				settings.access_item_amount = 0 -- no dragon marks needed when event flag -1 (special case)
    			end
    
    			return settings
    		end
    
    		function get_random_point(area_coordinates)
    			return math.random(area_coordinates.first.x, area_coordinates.last.x), math.random(area_coordinates.first.y, area_coordinates.last.y)
    		end
    
    		function warp_to_lair()
    			local settings = dragon_lair_access.get_settings()
    			local x, y = dragon_lair_access.get_random_point(settings.warp_in)
    			char_log(pc.get_player_id(), 'LAIR', pc.get_channel_id() ..' WARPTOLAIR: x:'.. x ..', y:' .. y)
    			pc.warp(x,y)
    		end
    
    		function warp_from_lair()
    			local settings = dragon_lair_access.get_settings()
    			local x, y = dragon_lair_access.get_random_point(settings.warp_out)
    			char_log(pc.get_player_id(), 'LAIR', pc.get_channel_id() ..' WARPFROMLAIR: x:'.. x ..', y:' .. y)
    			pc.warp(x,y)
    		end
    
    		function warp_all_from_lair()
    			local settings = dragon_lair_access.get_settings()
    			warp_all_in_area_to_area(settings.room_area.first.x, settings.room_area.first.y, settings.room_area.last.x, settings.room_area.last.y, settings.warp_out.first.x, settings.warp_out.first.y, settings.warp_out.last.x, settings.warp_out.last.y)
    			game.set_event_flag("dragon_lair_alive", 0) -- dragon is dead
    			char_log(0, 'LAIR', 'WARP ALL')
    		end
    
    		function get_time_remaining()
    			local settings = dragon_lair_access.get_settings()
    			return (game.get_event_flag("dragon_lair_time") + settings.cooldown_time - get_global_time())
    		end
    
    		function give_item_to_ghost()
    			local settings = dragon_lair_access.get_settings()
    			say_title(gameforge.ghost_story._010_sayTitle)
    			say(gameforge.dragon_lair_access._130_say)
    			say(settings.access_item_amount.."x: ")
    			say_item_vnum(settings.access_item)
    			local give_item = select(gameforge.dragon_lair_access._140_select, gameforge.locale.cancel)
    			if give_item == 1 then
    				pc.remove_item(settings.access_item, settings.access_item_amount)
    				char_log(pc.get_player_id(), 'LAIR', pc.get_channel_id() ..' GIVE ITEM')
    				return true
    			else
    				return false
    			end
    		end
    
    		function show_time_remaining(time_remaining)
    			q.set_title(gameforge.dragon_lair_access._165_sendLetter)
    			send_letter(gameforge.dragon_lair_access._165_sendLetter)
    			q.set_clock(gameforge.locale.monkey_dungeon.quest_rest_time, time_remaining)
    			timer("dragon_lair_timer", time_remaining)
    			notice_multiline(string.format(gameforge.dragon_lair_access._170_notice, time_remaining / 60), notice)
    			q.start()
    		end
    
    		when enter or login begin
    			pc.setqf("is_leader", 0)
    			q.done()
    			if pc.get_map_index() == 208 and not pc.is_gm() then
    				dragon_lair_access.warp_from_lair()
    			end
    		end
    
    		when blue_dragon_timer.server_timer begin
    			game.set_event_flag("dragon_lair_timer_used", 0)
    			if game.get_event_flag("dragon_lair_alive") == 1 then
    				notice_multiline(gameforge.dragon_lair_access._150_notice, notice_all)
    			else
    				notice_multiline(gameforge.dragon_lair_access._160_notice, notice_all)
    			end
    			dragon_lair_access.warp_all_from_lair()
    		end
    
    		when 30121.chat.gameforge.dragon_lair_access._010_npcChat with pc.get_map_index() != 208 begin
    			
    			local starttime = game.get_event_flag("dragon_lair_time")
    			local current_time = get_global_time()
    			local settings = dragon_lair_access.get_settings()
    			local time_remaining = dragon_lair_access.get_time_remaining()
    
    			if pc.count_item(settings.access_item) >= settings.access_item_amount then
    				if starttime + settings.group_time >= current_time then
    					local password_input;
    					repeat
    						say_title(gameforge.ghost_story._010_sayTitle)
    						say(gameforge.dragon_lair_access._020_say)
    						password_input = tonumber(input())
    						if password_input != game.get_event_flag("dragon_lair_password") then
    							say_title(gameforge.ghost_story._010_sayTitle)
    							say(gameforge.dragon_lair_access._030_say)
    							local again = select(gameforge.dragon_lair_access._040_select, gameforge.locale.cancel)
    							if again == 2 then
    								return
    							end
    						end
    					until password_input == game.get_event_flag("dragon_lair_password")
    					if not dragon_lair_access.give_item_to_ghost() then
    						return
    					end
    					
    					-- right password
    					pc.setqf("time", starttime)
    					dragon_lair_access.warp_to_lair()
    					set_state(kill_dragon)
    				elseif time_remaining < 0 and npc.lock() then -- it is the first player talking with the ghost
    					say_title(gameforge.ghost_story._010_sayTitle)
    					say(gameforge.dragon_lair_access._050_say)
    					local abort = select(gameforge.dragon_lair_access._060_select, gameforge.locale.cancel)
    
    					if abort == 2 then
    						npc.unlock()
    						return
    					end
    					local password_number;
    					repeat
    						say_title(gameforge.ghost_story._010_sayTitle)
    						say(gameforge.dragon_lair_access._070_say)
    						password_number = tonumber(input())
    						local again;
    						if type(password_number) != 'number' then
    							say_title(gameforge.ghost_story._010_sayTitle)
    							say(gameforge.dragon_lair_access._080_say)
    							again = select(gameforge.dragon_lair_access._040_select, gameforge.locale.cancel)
    							if again == 2 then
    								npc.unlock()
    								return
    							end
    						end
    					until type(password_number) == 'number'
    
    					if not dragon_lair_access.give_item_to_ghost() then
    						npc.unlock()
    						return
    					end
    					
    					if dragon_lair_access.get_time_remaining() > 0 then
    						pc.give_item2(settings.access_item, settings.access_item_amount)
    						npc.unlock()
    						say_title(gameforge.ghost_story._010_sayTitle)
    						say(gameforge.dragon_lair_access._120_say)
    						return
    					end
    					
    					pc.setqf("password", password_number)
    					timer("dragon_lair_warptimer", pc.get_channel_id()*2)
    					
    					npc.unlock()
    				else
    					say_title(gameforge.ghost_story._010_sayTitle)
    					say(gameforge.dragon_lair_access._120_say)
    					return
    				end
    
    			else
    				say_title(gameforge.ghost_story._010_sayTitle)
    				say(gameforge.dragon_lair_access._100_say)
    				say(gameforge.dragon_lair_access._105_say)
    				say(settings.access_item_amount.."x: ")
    				say_item_vnum(settings.access_item)
    				return
    			end
    		end
    
    		when 30121.chat.gameforge.dragon_lair_access._110_npcChat with pc.get_map_index() == 208 begin
    			say_title(gameforge.ghost_story._010_sayTitle)
    			say(gameforge.dragon_lair_access._115_say)
    			local warp = select(gameforge.dragon_lair_access._116_select, gameforge.dragon_lair_access._117_select)
    			if warp == 1 then
    				dragon_lair_access.warp_from_lair() -- so that GMs get ported out, too
    				set_state(start)
    			end
    		end
    		
    		when dragon_lair_warptimer.timer begin
    			local settings = dragon_lair_access.get_settings()
    			if dragon_lair_access.get_time_remaining() < 0 then
    				local starttime = get_global_time()
    				game.set_event_flag("dragon_lair_time", starttime) -- set start time
    				char_log(pc.get_player_id(), 'LAIR', pc.get_channel_id() ..' SET STARTTIME: ' .. starttime)
    				pc.setqf("time", starttime)
    				
    				pc.setqf("is_leader", 1)
    				game.set_event_flag("dragon_lair_password", pc.getqf("password")) -- set password
    				char_log(pc.get_player_id(), 'LAIR', pc.get_channel_id() ..' SET PASSWORD: '.. pc.getqf("password"))
    				
    				server_timer("blue_dragon_timer", settings.cooldown_time)
    				
    				dragon_lair_access.warp_to_lair()
    				set_state(spawn_dragon)
    			else
    				pc.give_item2(settings.access_item, settings.access_item_amount)
    				say_title(gameforge.ghost_story._010_sayTitle)
    				say(gameforge.dragon_lair_access._120_say)
    			end
    			pc.setqf("password", 0)
    		end
    	end
    
    	state spawn_dragon begin
    		when login begin
    			local settings = dragon_lair_access.get_settings()
    			purge_area(settings.room_area.first.x, settings.room_area.first.y, settings.room_area.last.x, settings.room_area.last.y)
    			notice_multiline(string.format(gameforge.dragon_lair_access._090_notice, pc.name), notice_all)
    			
    			-- spawn all mobs needed
    			regen_in_map(208, "locale/_master/map/metin2_map_skipia_dungeon_boss/regen.txt")
    			mob.spawn_group(settings.dragon_vnum, settings.spawn.x, settings.spawn.y, 1, 1, 1) -- spawn the dragon
    			
    			
    			game.set_event_flag("dragon_lair_alive", 1) -- dragon is alive
    			char_log(pc.get_player_id(), 'LAIR', pc.get_channel_id() ..' SPAWN DRAGON')
    			
    			notice_multiline(string.format(gameforge.dragon_lair_access._145_notice, game.get_event_flag("dragon_lair_password")), notice)
    			dragon_lair_access.show_time_remaining(settings.cooldown_time)
    			
    			set_state(kill_dragon)
    		end
    
    		when 30121.chat.gameforge.dragon_lair_access._110_npcChat with pc.get_map_index() == 208 begin
    			say_title(gameforge.ghost_story._010_sayTitle)
    			say(gameforge.dragon_lair_access._115_say)
    			local warp = select(gameforge.dragon_lair_access._116_select, gameforge.dragon_lair_access._117_select)
    			if warp == 1 then
    				dragon_lair_access.warp_from_lair()
    				set_state(start)
    			end
    		end
    		
    	end
    
    	state kill_dragon begin
    
    		when dragon_lair_timer.timer begin
    			set_state(start)
    		end
    
    		when login begin
    			if pc.getqf("time") != game.get_event_flag("dragon_lair_time") or dragon_lair_access.get_time_remaining() <= 0 then
    				set_state(start)
    			else
    				dragon_lair_access.show_time_remaining(dragon_lair_access.get_time_remaining())
    			end
    		end
    		
    		when button or info begin
    			notice_multiline(string.format(gameforge.dragon_lair_access._170_notice, dragon_lair_access.get_time_remaining() / 60), notice)
    			local settings = dragon_lair_access.get_settings()
    			if (pc.getqf("is_leader") == 1 and settings.cooldown_time-dragon_lair_access.get_time_remaining() < settings.group_time) then
    				notice_multiline(string.format(gameforge.dragon_lair_access._145_notice, game.get_event_flag("dragon_lair_password")), notice)
    			end
    		end
    
    		when 30121.chat.gameforge.dragon_lair_access._110_npcChat with pc.get_map_index() == 208 begin
    			say_title(gameforge.ghost_story._010_sayTitle)
    			say(gameforge.dragon_lair_access._115_say)
    			local warp = select(gameforge.dragon_lair_access._116_select, gameforge.dragon_lair_access._117_select)
    			if warp == 1 then
    				dragon_lair_access.warp_from_lair()
    				set_state(start)
    			end
    		end
    
    		when 20009.chat.gameforge.dragon_lair_access._190_npcChat or 9012.chat.gameforge.dragon_lair_access._190_npcChat or 30121.chat.gameforge.dragon_lair_access._190_npcChat with pc.get_map_index() != 208  begin
    			if pc.getqf("time") > 0 and pc.getqf("time") == game.get_event_flag("dragon_lair_time") then
    				dragon_lair_access.warp_to_lair()
    			else
    				say_title(gameforge.neutral_warp._20_sayTitle)
    				say(gameforge.dragon_lair_access._120_say)
    				set_state(start)
    			end
    		end
    		when 2493.kill with pc.get_map_index() == 208 begin
    			char_log(pc.get_player_id(), 'LAIR', pc.get_channel_id() ..' DRAGON KILLED')
    			game.set_event_flag("dragon_lair_alive", 0) -- dragon is dead
    			game.drop_item_with_ownership(71123, 1) -- dropping dragon scale
    			game.drop_item_with_ownership(71129, 1) -- dropping toe nail
    			notice_multiline(string.format(gameforge.dragon_lair_access._180_notice, pc.name), notice_all) -- the dragon has been killed by <name>!
    			local settings = dragon_lair_access.get_settings()
    			purge_area(settings.room_area.first.x, settings.room_area.first.y, settings.room_area.last.x, settings.room_area.last.y)
    		end
    	end
    end
    quest dragon_lair_weekly begin
    	state start begin
    		
    		function set_settings()
    			local settings = { }
    			-- how long the player has to wait until he can do the quest again
    			settings.cooldown_time = 561600 -- 60 seconds * 60 minutes * 24 hours * 6.5 days
    			-- how long the player has time to get the items
    			settings.time_to_hunt = 7200 -- 2 hours
    			
    			-- those items should be hunted
    			settings.items_to_hunt = {
    				30198,
    				30199,
    				50721,
    				50722,
    				50723,
    				50725,
    				50726,
    				50727
    			}
    			-- the amount of items to be hunted. Array field relate to settings.items_to_hunt
    			settings.amount_to_hunt = {
    				10,
    				10,
    				50,
    				50,
    				50,
    				50,
    				50,
    				50
    			}
    			
    			settings.amount_to_pay = 150000
    			
    			-- Rewards:
    			-- how often he gets a normal item instead of a poly marble
    			settings.normal_items_rate = 50 -- in percent
    			
    			-- reward tables follow the rules: {vnum, quantity, mininum level, maximum level}
    			
    			-- reward items when giving a normal item
    			settings.normal_items = {
    				{70008, 1}
    			}
    			
    			-- vnum of the poly marble (to show an icon to the player)
    			settings.poly_item_vnum = 71093
    			
    			-- mobs to give in a poly marble
    			settings.poly_mobs = {
    				{175, 6},
    				{184, 6},
    				{501, 4},
    				{502, 4},
    				{552, 2, 85},
    				{771, 6},
    				{1601, 2, 95},
    				{2001, 4},
    				{2051, 2, 90},
    				{2061, 2, 90},
    				{2131, 6},
    				{5003, 6}
    			}
    			
    			return settings
    		end
    		
    		when login or enter or levelup with pc.get_level() >= 85 begin
    			set_state(getquest)
    		end
    	end
    	
    	state getquest begin
    
    		when enter begin
    			pc.setqf("item_to_hunt", 0)
    			pc.setqf("amount_to_hunt", 0)
    		end
    	
    		-- "Give me polymorph items!"
    		when 30122.chat.gameforge.dragon_lair_weekly._010_chat with pc.get_map_index() == 73 begin
    			local settings = dragon_lair_weekly.set_settings()
    			local time_to_wait = pc.getqf("lasttime") - get_global_time() + settings.cooldown_time
    			-- "Ghost of a warrior: "
    			say_title(gameforge.dragon_lair_weekly._020_sayTitle)
    			if time_to_wait < 0 then 
    				-- the player has no cooldown any longer
    				local item_to_hunt = pc.getqf("item_to_hunt")
    				local amount_to_hunt = pc.getqf("amount_to_hunt")
    				if item_to_hunt == 0 then
    					local table_number = math.random(table.getn(settings.items_to_hunt))
    					item_to_hunt = settings.items_to_hunt[table_number]
    					amount_to_hunt = settings.amount_to_hunt[table_number]
    					pc.setqf("item_to_hunt", item_to_hunt)
    					pc.setqf("amount_to_hunt", amount_to_hunt)
    				end
    				
    				-- "You have to collect %s:"
    				say(string.format(gameforge.dragon_lair_weekly._030_say, amount_to_hunt))
    				say_item_vnum(item_to_hunt)
    				-- "Then I will give you polymorph!"
    				say(gameforge.dragon_lair_weekly._040_say)
    				-- yes / no
    				local accept = select(gameforge.dragon_lair_weekly._050_select, gameforge.dragon_lair_weekly._060_select)
    				if accept == 1 then
    					set_state(hunt_item)
    				else
    					say_title(gameforge.dragon_lair_weekly._020_sayTitle)
    					-- "You are mean to me!"
    					say(gameforge.dragon_lair_weekly._070_say)
    				end
    			else
    				-- player still has cooldown
    				-- "You have to wait %s longer!"
    				say(string.format(gameforge.dragon_lair_weekly._080_say, get_time_remaining(time_to_wait)))
    			end
    		end
    	end
    	
    	state hunt_item begin
    		
    		-- returns the amount of items the player still has to hunt
    		function get_amount_remaining()
    			return (pc.getqf("amount_to_hunt") - pc.count_item(pc.getqf("item_to_hunt")))
    		end
    		
    		-- returns the time in seconds the player has left collecting the items.
    		function get_time_remaining()
    			local settings = dragon_lair_weekly.set_settings()
    			return (pc.getqf("lasttime") - get_global_time() + settings.time_to_hunt)
    		end
    		
    		when login begin
    			-- add a quest icon and timer
    			local time_remaining = dragon_lair_weekly.get_time_remaining()
    			q.set_clock(gameforge.dragon_lair_weekly._090_questRest, time_remaining) -- timer that will be shown to the player
    			timer("dragon_lair_weekly_timer", time_remaining) -- timer that will trigger the failing of this quest 
    			if dragon_lair_weekly.get_amount_remaining() > 0 then
    				-- "Collect things!"
    				send_letter(gameforge.dragon_lair_weekly._100_sendLetter)
    				q.set_title(gameforge.dragon_lair_weekly._110_sayTitle)
    			else
    				-- "Things collected!"
    				send_letter(gameforge.dragon_lair_weekly._120_sendLetter)
    				q.set_title(gameforge.dragon_lair_weekly._130_sayTitle)
    			end
    			q.start()
    		end
    		
    		when enter begin
    			local settings = dragon_lair_weekly.set_settings()
    			local time_remaining = settings.time_to_hunt
    			pc.setqf("lasttime", get_global_time()) -- reset the cooldown
    			-- "Collect things!"
    			send_letter(gameforge.dragon_lair_weekly._100_sendLetter)
    			q.set_title(gameforge.dragon_lair_weekly._110_sayTitle)
    			q.set_clock(gameforge.dragon_lair_weekly._090_questRest, time_remaining) -- timer that will trigger the failing of this quest 
    			timer("dragon_lair_weekly_timer", time_remaining) -- timer that will trigger the failing of this quest 
    			q.start()
    		end
    		
    		when info or button begin
    			local settings = dragon_lair_weekly.set_settings()
    			local amount_remaining = dragon_lair_weekly.get_amount_remaining()
    			if (amount_remaining > 0) then
    				local time_remaining = dragon_lair_weekly.get_time_remaining()
    				if (time_remaining > 0) then
    					-- player still has to collect items
    					say_title(gameforge.dragon_lair_weekly._110_sayTitle) -- quest title
    					-- "You still have to collect %s:"
    					say(string.format(gameforge.dragon_lair_weekly._140_say, amount_remaining))
    					say_item_vnum(pc.getqf("item_to_hunt"))
    					say("")
    					say(gameforge.dragon_lair_weekly._090_questRest .. get_time_remaining(time_remaining))
    				else
    					-- player did not collect the items in time
    					
    					-- "You failed collecting the items in time!"
    					notice_multiline(gameforge.dragon_lair_weekly._160_notice,notice)
    					q.done()
    					set_state(getquest) -- reset the quest, but the cooldown remains
    				end
    			else
    				say_title(gameforge.dragon_lair_weekly._130_sayTitle) -- quest title
    				-- "You have all needed items. Go back to the warrior Ghost! He is in heavens cave 2"
    				say(gameforge.dragon_lair_weekly._150_say)
    			end
    		end
    		
    		when dragon_lair_weekly_timer.timer begin
    			-- the player did not collect the items in time
    			
    			-- "You failed collecting the items in time!"
    			notice_multiline(gameforge.dragon_lair_weekly._160_notice,notice)
    			q.done()
    			set_state(getquest) -- reset the quest, but the cooldown remains
    		end	
    		
    		
    		when 30122.chat.gameforge.dragon_lair_weekly._010_chat with pc.get_map_index() == 73 begin
    			local settings = dragon_lair_weekly.set_settings()
    			say_title(gameforge.dragon_lair_weekly._020_sayTitle)
    
    			local amount_remaining = dragon_lair_weekly.get_amount_remaining()
    			if amount_remaining > 0 then
    				-- the player did not collect enough items
    				-- "You still have to collect %s:"
    				say(string.format(gameforge.dragon_lair_weekly._140_say, amount_remaining))
    				say_item_vnum(pc.getqf("item_to_hunt"))
    				
    				-- "Then I will give you polymorph!"
    				say(gameforge.dragon_lair_weekly._040_say)
    			elseif pc.money < settings.amount_to_pay then
    				-- you don't have enough yang to pay
    				say(gameforge.dragon_lair_weekly._175_say)
    			else
    				-- "You want to give me %s ?: "
    				say(string.format(gameforge.dragon_lair_weekly._170_say, pc.getqf("amount_to_hunt")))
    				say_item_vnum(pc.getqf("item_to_hunt"))
    				-- "Yes" / "No"
    				local give_item = select(gameforge.dragon_lair_weekly._180_select, gameforge.dragon_lair_weekly._190_select)
    				say_title(gameforge.dragon_lair_weekly._020_sayTitle)
    				if (give_item == 1) then
    					-- "Thanks, now you get this from me: "
    					-- see if a normal item, or a polymorph item should be given
    					if math.random(100) < settings.normal_items_rate then -- normal item
    						say(gameforge.dragon_lair_weekly._205_sayReward)
    						local award_vnum = get_random_vnum_from_table(settings.normal_items)
    						say_item_vnum(award_vnum)
    						pc.give_item2(award_vnum)
    					else -- polymorph item
    						say(gameforge.dragon_lair_weekly._200_sayReward)
    						local award_vnum = get_random_vnum_from_table(settings.poly_mobs)
    						say_item(item_name(settings.poly_item_vnum), settings.poly_item_vnum, mob_name(award_vnum))
    						pc.give_poly_marble(award_vnum) -- give a poly morph item with this mob vnum in it
    					end
    
    					pc.remove_item(pc.getqf("item_to_hunt"), pc.getqf("amount_to_hunt")) -- remove the questitems from inventory
    					pc.changemoney(settings.amount_to_pay) -- player pays yang for the item
    					q.done()
    					set_state(getquest)
    				else
    					say(gameforge.dragon_lair_weekly._210_say)
    				end
    			end
    		end
    	end
    end

    those quest might not fully work duo to some setting error (i can fix them if they dont work but my study ><)

×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.