Skip to content

Commit

Permalink
Added refine trigger.
Browse files Browse the repository at this point in the history
  • Loading branch information
Lead0b110010100 authored and Lead0b110010100 committed Apr 27, 2020
1 parent 62e63db commit 250f806
Show file tree
Hide file tree
Showing 7 changed files with 23 additions and 5 deletions.
2 changes: 1 addition & 1 deletion main/srv1/share/locale/germany/quest/first_login.lua
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ quest first_login begin
pc.set_skill_level(127, 20)
pc.set_skill_level(128, 20)

name = clickable_tag(NAME_COLOR, pc.get_name())
name = clickable_pn_tag(NAME_COLOR, pc.get_name())
job = ({"Krieger","Ninja","Sura","Schamanen"})[pc.job+1]
empire = ({"Shinsoo","Chunjo","Jinno"})[pc.get_empire()]

Expand Down
2 changes: 1 addition & 1 deletion main/srv1/share/locale/germany/quest/level_info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ quest level_info begin
state start begin
when levelup begin
if pc.level == 100 and not pc.is_gm() then
notice_all(tag(SERVER_COLOR, "[Server]") .. " " .. clickable_tag(NAME_COLOR, pc.get_name()) .. " " .. tag(TEXT_COLOR, string.format("hat das max Lv. %d erreicht, Glückwunsch!", 100)))
notice_all(tag(SERVER_COLOR, "[Server]") .. " " .. clickable_pn_tag(NAME_COLOR, pc.get_name()) .. " " .. tag(TEXT_COLOR, string.format("hat das max Lv. %d erreicht, Glückwunsch!", 100)))
end
end
end
Expand Down
5 changes: 4 additions & 1 deletion main/srv1/share/locale/germany/quest/quest_functions
Original file line number Diff line number Diff line change
Expand Up @@ -982,4 +982,7 @@ xpcall
select3
BuildSkillList
tag
clickable_tag
clickable_pn_tag
clickable_item_tag
pc.is_dev
say_mob
2 changes: 2 additions & 0 deletions main/srv1/share/locale/germany/quest/quest_list
Original file line number Diff line number Diff line change
Expand Up @@ -42,3 +42,5 @@ Biolog/biolog_01.lua
Biolog/biolog_02.lua
Biolog/biolog_03.lua
Biolog/biolog_04.lua

refine_item_information.lua
8 changes: 7 additions & 1 deletion main/srv1/share/locale/germany/quest/questlib.lua
Original file line number Diff line number Diff line change
Expand Up @@ -11,21 +11,27 @@ GOLD_MAX = 10000000000 + 1
SERVER_COLOR = 1
NAME_COLOR = 2
TEXT_COLOR = 3
ITEM_COLOR = 4

tagColors = {
[SERVER_COLOR] = "|cffffc8c8",
[NAME_COLOR] = "|cffffd74c",
[TEXT_COLOR] = "|cffa7ffd4",
[ITEM_COLOR] = "|cffffc700",
}

tag = function (color_id, text)
return string.format("%s%s|r", tagColors[color_id], text)
end

clickable_tag = function (color_id, text)
clickable_pn_tag = function (color_id, text)
return string.format("%s|Hpn_%s|h%s|h|r", tagColors[color_id], text, text)
end

clickable_item_tag = function (color_id, vnum, name)
return string.format("%s|Hitem:%x:0:0:0:0|h[%s]|h|r", tagColors[color_id], vnum, name)
end

--quest.create = function(f) return coroutine.create(f) end
--quest.process = function(co,args) return coroutine.resume(co, args) end
setstate = q.setstate
Expand Down
2 changes: 1 addition & 1 deletion main/srv1/share/locale/germany/quest/rainbowstone.lua
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ quest rainbowstone begin
pc.set_skill_level((vnum) ,40)
say_reward("Deine Fertigkeit wurde auf P gesetzt.")
say_reward("Viel Spaß weiterhin auf unserem Server!")
notice_all(tag(SERVER_COLOR, "[Server]") .. " " .. clickable_tag(NAME_COLOR, pc.get_name()) .. " " .. tag(TEXT_COLOR, string.format("hat erfolgreich %sauf P geskillt!", name)))
notice_all(tag(SERVER_COLOR, "[Server]") .. " " .. clickable_pn_tag(NAME_COLOR, pc.get_name()) .. " " .. tag(TEXT_COLOR, string.format("hat erfolgreich %sauf P geskillt!", name)))
pc.removeitem("50512", 1)
end
end
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
quest refine_item_information begin
state start begin
when refine with item.get_level() == 9 begin
chat(string.format("%s %s |cffa7ffd4hat erfolgreich %s geuppt!|r", tag(SERVER_COLOR, "[Server]"), clickable_pn_tag(NAME_COLOR, pc.get_name()), clickable_item_tag(ITEM_COLOR, item.get_vnum(), item.get_name())))
end
end
end

0 comments on commit 250f806

Please sign in to comment.