Скажите пожалуйста, как правильно написать в lua script кнопочку, чтобы она призывала моба
НПС призыв моба>>
Сообщений 1 страница 2 из 2
Поделиться22013-01-19 18:21:41
Скажите пожалуйста, как правильно написать в lua script кнопочку, чтобы она призывала моба
Вот образец старого скрипта на призыв боссов
function NPC_boss_summon_init()
cprint( "Boss Summon" )
set_npc_name( "Boss" )
endfunction NPC_boss_summon_contact()
dlg_title( "Boss Summon" )
dlg_text( "Я призываю боссов!" )dlg_menu( "<#0000FF>Призыв боссов", "priziw_boss()" )
dlg_menu( "@90300505", 'RunTeleport( 10, 6625 , 6980 )' )
dlg_menu( "@90300506", 'RunTeleport( 10, 116799 , 58205 )' )
dlg_menu( "@90300512", 'RunTeleport( 10, 153506 , 77175 )' )
dlg_menu( "@90010002", '' )
dlg_show()
end
function priziw_boss()
dlg_title( "Привет" )
dlg_text( "Выберите противника. Не забывайте я призываю не за просто так!" )
dlg_menu( "Oforia 20.000.000", "Boss_1()")
dlg_menu( "Abhuva 20.000.000", "Boss_2()")
dlg_menu( "Primal Scream 20.000.000", "Boss_3()")
dlg_menu( "Taranida 20.000.000", "Boss_4()")
dlg_menu( "Crustalino 20.000.000", "Boss_5()")
dlg_menu( "Likirus 20.000.000", "Boss_6()")
dlg_menu( "Soulseeker 20.000.000", "Boss_7()")
dlg_menu( "Takin 20.000.000", "Boss_8()")
dlg_menu( "Aurumis 20.000.000", "Boss_9()")
dlg_menu( "Betrayal (140) 20.000.000", "Boss_10()")
dlg_menu( "Betrayal (158) 20.000.000", "Boss_11()")
dlg_menu( "Betrayal Hardmode 20.000.000", "Boss_12()")
dlg_menu( "Draka (165) 20.000.000", "Boss_13()")
dlg_menu( "Kruzin (165) 20.000.000", "Boss_14()")
dlg_menu( "Teruzin (165) 20.000.000", "Boss_15()")
dlg_menu( "Queen Eva (170) 20.000.000", "Boss_16()")
dlg_menu( "Ashmaw (170) 20.000.000", "Boss_17()")
dlg_menu( "Ashmaw Hardmode 20.000.000", "Boss_18()")
dlg_menu( "Nightmare Boss (175) 20.000.000", "Boss_19()")
dlg_menu( "Unicorn Boss (175) 20.000.000", "Boss_20()")
dlg_menu( "DeathWhisper (180) 20.000.000", "Boss_21()")
dlg_menu( "Obsidikar (185) 20.000.000", "Boss_22()")
dlg_menu( "Sand Lord Kynish (190) 20.000.000", "Boss_23()")
dlg_menu( "Sandlord Hardmode 20.000.000", "Boss_24()")
dlg_menu( "@90010001", " " )
dlg_show()
dlg_menu( "Bye!", '')
end
function Boss_1()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9040018,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_2()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9050013,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_3()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9060016,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_4()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9070012,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_5()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9080014,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_6()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9090019,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_7()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9108022,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_8()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9110015,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_9()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,145010,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_10()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,25,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_11()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9158002,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_12()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,10158002,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_13()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc(185081,117410,165007,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_14()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,165005,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_15()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,165006,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_16()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,170003,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_17()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9170001,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_18()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,10170001,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_19()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,175003,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_20()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,175002,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_21()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,180003,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_22()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,185001,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_23()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 185081,117410,9190001,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
function Boss_24()
local gold = get_value( "gold" )
if gold >= 20000000 then
add_npc( 18557,171946,10190001,1)
set_value( "gold", gold - 20000000 )
update_gold_chaos()
NPC_boss_summon_contact()
return
end
if gold < 20000000 then
dlg_title( "No Money" )
dlg_text( "Sorry you need more Money" )
returnend
end
Меняй ид моба и цену за призыв если надо, так же не забудь добавить самого нпс, если что, то не понятно пиши.
Отредактировано kochewnik95 (2013-01-19 18:24:26)