Arkadaşlar almanca konuşmayı bilmiyorum fakat ben bu forumdan çok faydalandığım için türk forumlarında paylaşmadan önce yaptığım bu sistemi sizle paylaşmak istedim.
Tugyis Tabelası Sistemi
tugyis.quest
questlib.lua
quest_functions
player/tugyis.sql
Arkadaşlar test etmedim umarım beğenirsiniz....
Tugyis Tabelası Sistemi
tugyis.quest
PHP Code:
--[[
-- Tugyis Toplama Questi
-- Quest Yazıcısı : Mehmet GÜNDAŞ
]]--
quest tugyis begin
state start begin
when 20095.chat."Tugyis Tabelası" with game.get_event_flag("toplaa") == 1 begin
say_title("Servis 1:")
say_title("")
say("Şuan envanterindeki tabela sayısı : "..pc.count_item(30166).."")
say("Ne yapmak istiyorsun ?")
local s = select("Hepsini Al", "Hepsini Geri Al", "Boşver")
if s == 1 then
game.set_event_flag(pc.get_name().."_tabela",game.get_event_flag(pc.get_name().."_tabela")+pc.count_item(30166))
chat("Toplam "..game.get_event_flag(pc.get_name().."_tabela".." Yükledin...")
pc.remove_item(30166, pc.count_item(30166))
loop_timer("update",0.5)
end
elseif s == 2 then
chat("Toplam "..game.get_event_flag(pc.get_name().."_tabela".." Geri Aldın...")
pc.give_item2("30166",game.get_event_flag(pc.get_name().."_tabela")
game.set_event_flag(pc.get_name().."_tabela",game.get_event_flag(pc.get_name().."_tabela")-game.get_event_flag(pc.get_name().."_tabela"))
loop_timer("update",0.5)
return
end
end
when login with game.get_event_flag(pc.get_name().."_tabela") == 0 and pc.getqf("tugyis") != 1 and game.get_event_flag("toplaa") == 1 begin
pc.setqf("tugyis",1)
game.set_event_flag(pc.get_name().."_tabela",game.get_event_flag(pc.get_name().."_tabela")+2)
mysql_query("INSERT INTO player.tugyis VALUES ('"..pc.get_player_id().."','"..pc.get_name().."','"..game.get_event_flag(pc.get_name().."_tabela").."' ) ")
end
when update.timer begin
tugyis_update()
end
end
end
PHP Code:
--Tugyis Eventi Güncelleme Başlangıç
function tugyis_update()
mysql_query("Update player.tugyis set tabela = '"..game.get_event_flag(pc.get_name().."_tabela").."' WHERE name = '"..pc.get_name().."' ")
end
--Tugyis Eventi Güncelleme Bitiş
PHP Code:
tugyis_update
PHP Code:
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- Table structure for `tugyis`
-- ----------------------------
DROP TABLE IF EXISTS `tugyis`;
CREATE TABLE `tugyis` (
`player_id` int(11) unsigned NOT NULL default '0',
`player_name` varchar(20) character set big5 collate big5_bin NOT NULL default '',
`tabela` int(255) NOT NULL default '0',
PRIMARY KEY (`player_id`)
) ENGINE=MyISAM DEFAULT CHARSET=big5;
-- ----------------------------
-- Records of tugyis
-- ----------------------------
Arkadaşlar test etmedim umarım beğenirsiniz....