quest account tabla

Indította soniice, 2017-10-01, 01:35:06

Sziasztok!

Ezt a questet hogy lehetne megoldani hogy account táblában az achievement oszlopba adja a pontot mindig?




[spoiler]quest achievement_system begin
state start begin
--LOGIN
when login begin
local actual_achievement_points = pc.getqf("achievement_points")
if pc.getqf("firstlogin") != 1 then
local Reward = 1
pc.setqf("firstlogin", 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement Dein_erster_Login%".. actual_achievement_points + Reward .."")
else
cmdchat("achievementpoints ".. pc.getqf("achievement_points"))
end
end

--METINS
when 8020.kill begin
local Reward = 5
local Achievement = "Shinsoo-Szikla"
local killcount = pc.getqf("8020")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8020", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_megölve#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8021.kill begin
local Reward = 5
local Achievement = "Jinno-Szikla"
local killcount = pc.getqf("8021")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8021", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8022.kill begin
local Reward = 5
local Achievement = "Chunjo-Szikla"
local killcount = pc.getqf("8022")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8022", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8031.kill begin
local Reward = 5
local Achievement = "Hegy Metinje"
local killcount = pc.getqf("8031")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8031", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8024.kill begin
local Reward = 2
local Achievement = "MetinPung-Ma"
local killcount = pc.getqf("8024")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8024", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8014.kill begin
local Reward = 3
local Achievement = "Gyilkosság metinje"
local killcount = pc.getqf("8014")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8014", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8013.kill begin
local Reward = 3
local Achievement = "Halál metinje"
local killcount = pc.getqf("8013")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8013", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8035.kill begin
local Reward = 3
local Achievement = "Megváltás metinje"
local killcount = pc.getqf("8035")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8035", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8036.kill begin
local Reward = 3
local Achievement = "Árulás metinje"
local killcount = pc.getqf("8036")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8036", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8037.kill begin
local Reward = 3
local Achievement = "Neheztelés metinje"
local killcount = pc.getqf("8037")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8037", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8038.kill begin
local Reward = 3
local Achievement = "Megtorlás metinje"
local killcount = pc.getqf("8038")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8038", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8039.kill begin
local Reward = 3
local Achievement = "Büszkeség metinje"
local killcount = pc.getqf("8039")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8039", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end
when 8040.kill begin
local Reward = 3
local Achievement = "Rosszakarat metinje"
local killcount = pc.getqf("8040")
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("8040", killcount + 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_zerstört#".. killcount + 1  .."%".. actual_achievement_points + Reward .."")
end

--LEVELS
when login or levelup with pc.get_level() >= 50 and pc.getqf("Level50") != 1 begin
local Reward = 2
local Achievement = "Level_50"
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("Level50", 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_szint%".. actual_achievement_points + Reward .."")
end
when login or levelup with pc.get_level() >= 75 and pc.getqf("Level75") != 1 begin
local Reward = 5
local Achievement = "Level_75"
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("Level75", 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_szint%".. actual_achievement_points + Reward .."")
end
when login or levelup with pc.get_level() >= 85 and pc.getqf("Level85") != 1 begin
local Reward = 10
local Achievement = "Level_85"
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("Level85", 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_szint%".. actual_achievement_points + Reward .."")
end
when login or levelup with pc.get_level() >= 90 and pc.getqf("Level90") != 1 begin
local Reward = 25
local Achievement = "Level_90"
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("Level90", 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_szint%".. actual_achievement_points + Reward .."")
end
when login or levelup with pc.get_level() >= 95 and pc.getqf("Level95") != 1 begin
local Reward = 50
local Achievement = "Level_95"
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("Level95", 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_szint%".. actual_achievement_points + Reward .."")
end
when login or levelup with pc.get_level() >= 99 and pc.getqf("Level99") != 1 begin
local Reward = 100
local Achievement = "Level_99"
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("Level99", 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_szint%".. actual_achievement_points + Reward .."")
end
when login or levelup with pc.get_level() >= 105 and pc.getqf("Level105") != 1 begin
local Reward = 200
local Achievement = "Level_105"
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("Level105", 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_szint%".. actual_achievement_points + Reward .."")
end
when login or levelup with pc.get_level() >= 112 and pc.getqf("Level112") != 1 begin
local Reward = 250
local Achievement = "Level_112"
local actual_achievement_points = pc.getqf("achievement_points")
pc.setqf("Level112", 1)
pc.setqf("achievement_points", actual_achievement_points + Reward)
cmdchat("achievement ".. Achievement .."_szint%".. actual_achievement_points + Reward .."")
end
end
end
[/spoiler]

csinálsz egy új funkciót, ami oda írja jóvá: egy egyszerű query

C++ programmer at Gameloft

Sajnos ez quest táblába irja bele.

mondom, csinálsz egy új funkciót a game fileban, vagy lua-ban is megoldhatod

C++ programmer at Gameloft