[Quest] - Tinctura Numelui
Scris: 09 Iun 2020, 17:14
Cod: Selectaţi tot
quest change_name begin
state start begin
when 71055.use begin
if pc.is_married() then
say("Nu-ti poti schimba numele dacã esti cãsãtorit. ")
say("")
return
end
if pc.is_polymorphed() then
say("Nu-ti poti schimba numele dacã esti transformat. ")
say("")
return
end
if pc.has_guild() then
say("Nu-ti poti schimba numele dacã esti într-o breaslã. ")
say("")
return
end
if party.is_party() then
say("Nu-ti poti schimba numele dacã esti într-o grupã. ")
say("")
return
end
if pc.get_level() < 50 then
say("Nu-ti poti schimba numele dacã ai nivelul")
say("mai mic de 49.")
say("")
return
end
if get_time() < pc.getqf("next_time") then
say("Nu poti folosi acest obiect acum!")
say("")
if is_test_server() == true then
say("Din moment ce-i server de test poti sã o faci !")
say("")
else
return
end
end
say("Introdu numele care vrei sã-l ai") ;
local name = pc.name ;
local str = input() ;
local ret = pc.change_name(str) ;
if ret == 0 then
say("Te rog sã te re-loghezi.")
say("")
char_log(0, "CHANGE_NAME", "HAVE NOT RE-LOGIN")
elseif ret == 1 then
say("A aparut o problema în timp ce foloseati acest item.")
say("Te rog sã-l folosesti iaras.")
say("")
char_log(0, "CHANGE_NAME", "ITEM USE PROBLEM")
elseif ret == 2 then
say("Acest nume este deja folosit.")
say("Te rog sã introduci alt nume.")
say("")
char_log(0, "CHANGE_NAME", "CAN NOT USE NAME")
elseif ret == 3 then
say("Acest nume este deja folosit.")
say("Te rog sã introduci alt nume.")
say("")
char_log(0, "CHANGE_NAME", "ALREADY USING NAME")
elseif ret == 4 then
say("Ai reusit sã-ti schimbi numele cu succes.")
say("Te rog sã dai log-out.")
say("")
pc.remove_item(71055, 1)
pc.setqf("next_time", get_time() + time_hour_to_sec(24*15))
char_log(0, "CHANGE_NAME", "SUCCESS: din "..name.." în "..str)
else
say("Eroare necunoscutã .")
say("")
char_log(0, "CHANGE_NAME", "UNKNOWN NAME")
end
end
end
endTutorial instalare quest:
- Salvaţi conţinutul quest-ului într-un fişier text numit de exemplu nume_quest.quest
- Vă conectaţi la filezilla / winscp şi întrati în /usr/home/game/share/locale/germany/quest (depinde ce server aveţi).
- Îl puneţi acolo (să fie .quest sau .lua).
- Te loghezi în FreeBSD / putty şi scrii în felul următor: cd /usr/home/game/share/locale/germany/quest apoi ./qc nume_quest.quest
- Intraţi pe server şi scrieţi /reload q
- Testaţi quest-ul.