Initial commit: server + serverfiles
This commit is contained in:
Executable
+1
@@ -0,0 +1 @@
|
||||
gameforge.dragon_lair_weekly._010_chat
|
||||
Executable
+25
@@ -0,0 +1,25 @@
|
||||
local settings = dragon_lair_weekly . set_settings ( )
|
||||
local time_to_wait = pc . getqf ( "lasttime" ) - get_global_time ( ) + settings . cooldown_time say_title ( gameforge . dragon_lair_weekly . _020_sayTitle )
|
||||
if time_to_wait < 0 then
|
||||
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
|
||||
say ( string . format ( gameforge . dragon_lair_weekly . _030_say , amount_to_hunt ) )
|
||||
say_item_vnum ( item_to_hunt )
|
||||
say ( gameforge . dragon_lair_weekly . _040_say )
|
||||
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 )
|
||||
say ( gameforge . dragon_lair_weekly . _070_say )
|
||||
end
|
||||
else
|
||||
say ( string . format ( gameforge . dragon_lair_weekly . _080_say , get_time_remaining ( time_to_wait ) ) )
|
||||
end
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
return pc . get_map_index ( ) == 73
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
gameforge.dragon_lair_weekly._010_chat
|
||||
Executable
+34
@@ -0,0 +1,34 @@
|
||||
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
|
||||
say ( string . format ( gameforge . dragon_lair_weekly . _140_say , amount_remaining ) )
|
||||
say_item_vnum ( pc . getqf ( "item_to_hunt" ) )
|
||||
say ( gameforge . dragon_lair_weekly . _040_say )
|
||||
elseif pc . money < settings . amount_to_pay then
|
||||
say ( gameforge . dragon_lair_weekly . _175_say )
|
||||
else
|
||||
say ( string . format ( gameforge . dragon_lair_weekly . _170_say , pc . getqf ( "amount_to_hunt" ) ) )
|
||||
say_item_vnum ( pc . getqf ( "item_to_hunt" ) )
|
||||
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
|
||||
if math . random ( 100 ) < settings . normal_items_rate then
|
||||
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
|
||||
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 )
|
||||
end
|
||||
pc . remove_item ( pc . getqf ( "item_to_hunt" ) , pc . getqf ( "amount_to_hunt" ) )
|
||||
pc . changemoney ( - settings . amount_to_pay )
|
||||
q . done ( )
|
||||
set_state ( "getquest" )
|
||||
else
|
||||
say ( gameforge . dragon_lair_weekly . _210_say )
|
||||
end
|
||||
end
|
||||
Executable
+1
@@ -0,0 +1 @@
|
||||
return pc . get_map_index ( ) == 73
|
||||
+1
@@ -0,0 +1 @@
|
||||
gameforge.ghost_story._310_npcChat
|
||||
+71
@@ -0,0 +1,71 @@
|
||||
local maindialog = 0
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _320_say )
|
||||
repeat
|
||||
if pc . getqf ( "know_warrior" ) == 1 then
|
||||
maindialog = select ( gameforge . ghost_story . _350_npcChat , gameforge . ghost_story . _370_npcChat , gameforge . ghost_story . _390_npcChat , gameforge . ghost_story . _430_npcChat , gameforge . ghost_story . _480_npcChat )
|
||||
if maindialog == 1 then
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _360_say )
|
||||
wait ( )
|
||||
elseif maindialog == 2 then
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _380_say )
|
||||
wait ( )
|
||||
elseif maindialog == 3 then
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _400_say )
|
||||
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat )
|
||||
if storymode == 2 then
|
||||
return
|
||||
end
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _410_say )
|
||||
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat )
|
||||
if storymode == 2 then
|
||||
return
|
||||
end
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _420_say )
|
||||
wait ( )
|
||||
elseif maindialog == 4 then
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _440_say )
|
||||
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat )
|
||||
if storymode == 2 then
|
||||
return
|
||||
end
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _450_say )
|
||||
storymode = select ( gameforge . locale . levelup . prev_quest_go , gameforge . ghost_story . _280_npcChat )
|
||||
if storymode == 2 then
|
||||
return
|
||||
end
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _460_say )
|
||||
wait ( )
|
||||
else
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _490_say )
|
||||
end
|
||||
else
|
||||
maindialog = select ( gameforge . ghost_story . _350_npcChat , gameforge . ghost_story . _040_npcChat )
|
||||
if maindialog == 1 then
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _360_say )
|
||||
wait ( )
|
||||
local subdialog1 = select ( gameforge . ghost_story . _370_npcChat )
|
||||
if subdialog1 == 1 then
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _380_say )
|
||||
pc . setqf ( "know_warrior" , 1 )
|
||||
wait ( )
|
||||
end
|
||||
else
|
||||
say_title ( gameforge . ghost_story . _300_sayTitle )
|
||||
say ( gameforge . ghost_story . _050_say )
|
||||
maindialog = 5
|
||||
end
|
||||
end
|
||||
until maindialog == 5
|
||||
return
|
||||
Reference in New Issue
Block a user