[RELASE]Tugyis Table System - Untested

11/06/2013 14:32 IGotPower#1
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
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 
== 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(30166pc.count_item(30166))
            
loop_timer("update",0.5)
            
end
            
elseif == 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") == and pc.getqf("tugyis") != 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 
questlib.lua

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ş 
quest_functions

PHP Code:
tugyis_update 
player/tugyis.sql

PHP Code:
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- 
Table structure for `tugyis`
-- ----------------------------
DROP TABLE IF EXISTS `tugyis`;
CREATE TABLE `tugyis` (
  `
player_idint(11unsigned NOT NULL default '0',
  `
player_namevarchar(20character set big5 collate big5_bin NOT NULL default '',
  `
tabelaint(255NOT NULL default '0',
  
PRIMARY KEY  (`player_id`)
ENGINE=MyISAM DEFAULT CHARSET=big5;

-- ----------------------------
-- 
Records of tugyis
-- ---------------------------- 

Arkadaşlar test etmedim umarım beğenirsiniz....
11/06/2013 14:35 Adam1519#2
In english pls :)
11/06/2013 14:38 IGotPower#3
ı'm sorry because i cant speak english. :(
11/07/2013 12:46 kstmr#4
so can you ask someone to trans for us
11/07/2013 14:03 thehero09#5
Quote:
Originally Posted by IGotPower View Post
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
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 
== 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(30166pc.count_item(30166))
            
loop_timer("update",0.5)
            
end
            
elseif == 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") == and pc.getqf("tugyis") != 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 
questlib.lua

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ş 
quest_functions

PHP Code:
tugyis_update 
player/tugyis.sql

PHP Code:
SET FOREIGN_KEY_CHECKS=0;
-- ----------------------------
-- 
Table structure for `tugyis`
-- ----------------------------
DROP TABLE IF EXISTS `tugyis`;
CREATE TABLE `tugyis` (
  `
player_idint(11unsigned NOT NULL default '0',
  `
player_namevarchar(20character set big5 collate big5_bin NOT NULL default '',
  `
tabelaint(255NOT NULL default '0',
  
PRIMARY KEY  (`player_id`)
ENGINE=MyISAM DEFAULT CHARSET=big5;

-- ----------------------------
-- 
Records of tugyis
-- ---------------------------- 

Arkadaşlar test etmedim umarım beğenirsiniz....

Teşekkürler. :D
11/07/2013 14:15 Conrew#6
Speak English! You can use Google Translate too!
11/07/2013 15:04 IGotPower#7
Önemli değil elimden geleni yapıyorum. Asıl beğendiğin için ben teşekkür ederim.
11/07/2013 16:00 Adam1519#8
I think this is a system which change items to coins.
Here is my translation:

PHP Code:
--[[
    -- 
Tugyis Collection Quest
    
-- Quest Yazıcısı : Mehmet GÜNDAŞ
]]--
quest tugyis begin
    state start begin
        when 20095.chat
."Tugyis Signs" with game.get_event_flag("toplaa") == 1 begin
            say_title
("Serwice 1")
            
say_title("")
            
say("Number of Signs: "..pc.count_item(30166).."")
            
say("What you want to do?")
            
local s select("Sell All""Get it all back""Cancel")
            if 
== 1 then
                game
.set_event_flag(pc.get_name().."_tabela",game.get_event_flag(pc.get_name().."_tabela")+pc.count_item(30166))
                
chat("Total "..game.get_event_flag(pc.get_name().."_tabela".." Signs You sold!")
                
pc.remove_item(30166pc.count_item(30166))
                
loop_timer("update",0.5)
            
end
            
elseif == 2 then
                chat
("Total "..game.get_event_flag(pc.get_name().."_tabela".." Signs comes back to You!")
                
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") == and pc.getqf("tugyis") != 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 
It's useless (in my opinion) cause we've got coupons without quest :P
But thanks for sharing!
11/08/2013 18:04 IGotPower#9
really im sorry i untested this quest. ı agree with you this quest is very bad im sorry
11/09/2013 09:45 MRodrigoXx#10
Don't you have english at school?
11/09/2013 11:12 IGotPower#11
i have english lesson at the school