Ultima modifica da un moderatore:
Salve, in mezz'ora ho imparato le basi del LUA e ho deciso di scrivere la mia prima missione. La missione chiede al livello 10 di uccidere 10 Cani Selvaggi e dopo averli uccisi si ricevono un certo tot. di EXP, Gold e Items.
Ditemi se funziona poichè non so neanche come si inserisce nel server. (Ho iniziato oggi con i servers di Metin2)
PHP:
-------------------------------------
------ Doggy Vol.1 (Easy 2 Learn)
---- Scripted by /TfF\ReckLess
-- The Favorites Few - Clan Game
-------------------------------------
quest doggy begin
state start begin
function a()
say_title("~Doggy~")
end
when letter begin with pc.get_level() >= 10 begin
send_letter("Love Doggy!")
end
when info or button with pc.get_level() >= 10 begin
doggy.a()
say("Heyoo man!")
say("Imma dog and you know it!")
say("")
say("")
say_reward("Woof-Woof!")
wait()
doggy.a()
say("I hate the dogs..")
say("Do you know it?")
say("")
say_reward("Kill 30 Wild Dog")
set_state("doggykilltime")
end
end
state doggykilltime begin
when letter begin
send_letter("Kill 10 Wild Dog")
end
when button or info with pc.get_level() >= 10 begin
doggy.a()
say_reward("The Wild Dog are attacking my niggas!!!")
say_reward("To get the situation under control,")
say_reward("you have to kill 10 fu**in Wild Dog.")
say("")
say("")
say_reward(string.format("So far you have killed %d Wild Dog.", pc.getqf("state")))
end
when 101.kill with pc.get_level() >= 10 begin
local count = pc.getqf("state") + 1
if count <= 10 then
pc.setqf("state", count)
q.set_counter("Rest-amount", 10 - count)
if count == 10 then
doggy.a()
say("You have killed all 10 Wild Dog.")
say("")
say_reward("Items received: potions")
say_reward("EXP received: 500.000")
say_reward("Gold received: 200.000")
pc.give_item2("27003",200)
pc.give_item2("27006",200)
pc.give_exp2(500000)
pc.change_money(200000)
set_state(__COMPLETE__)
end
end
end
end
state __COMPLETE__ begin
end
end
Ditemi se funziona poichè non so neanche come si inserisce nel server. (Ho iniziato oggi con i servers di Metin2)