Jump to content

Recommended Posts

  • 3 months later...
  • 9 months later...
  • Active Member
----------------------------------------------
-- File: pet_system.quest
-- Autor: Paylasici
-- Three pets changes, large rewritting: Think
----------------------------------------------

quest pet_system begin
	-- All quest functions can go here
	state __FUNC__ begin
		function get_pet_info(petType)
            return ({
                [1] = {34005, 1},
                [2] = {20209, 1},
                [3] = {34006, 1},
                [4] = {20210, 1},
                [5] = {34007, 1},
                [6] = {20211, 1},
                [7] = {34008, 1},
                [8] = {20212, 1},
				[9] = {34002, 1},
				[10] = {20213, 1}
			})[petType]
		end

		function get_spawn_effect_file(idx)
			return ({
				[0] = nil,
				[1] = "d:\\\\ymir work\\\\effect\\\\etc\\\\appear_die\\\\npc2_appear.mse",
				[2] = "d:\\\\ymir work\\\\effect\\\\etc\\\\levelup_1\\\\level_up.mse"
			})[idx]
		end

		function get_db_query(tableRow)
			local petID = pet_glob_table[pc.get_name()]["id"]
			return ({
				[1] = {"UPDATE "..get_db_player()..".pet SET activated = "..pet_glob_table[pc.get_name()][1].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[2] = {"UPDATE "..get_db_player()..".pet SET name = '"..pet_glob_table[pc.get_name()][2].."' WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[3] = {"UPDATE "..get_db_player()..".pet SET type = "..pet_glob_table[pc.get_name()][3].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[4] = {"UPDATE "..get_db_player()..".pet SET level = "..pet_glob_table[pc.get_name()][4].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[5] = {"UPDATE "..get_db_player()..".pet SET exp = "..pet_glob_table[pc.get_name()][5].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[6] = {"UPDATE "..get_db_player()..".pet SET exp_max = "..pet_glob_table[pc.get_name()][6].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[7] = {"UPDATE "..get_db_player()..".pet SET progress_01 = "..pet_glob_table[pc.get_name()][7].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[8] = {"UPDATE "..get_db_player()..".pet SET progress_02 = "..pet_glob_table[pc.get_name()][8].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[9] = {"UPDATE "..get_db_player()..".pet SET progress_03 = "..pet_glob_table[pc.get_name()][9].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[10] = {"UPDATE "..get_db_player()..".pet SET progress_03_temp = "..pet_glob_table[pc.get_name()][10].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[11] = {"UPDATE "..get_db_player()..".pet SET progress_04 = "..pet_glob_table[pc.get_name()][11].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[12] = {"UPDATE "..get_db_player()..".pet SET progress_04_temp = "..pet_glob_table[pc.get_name()][12].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[13] = {"UPDATE "..get_db_player()..".pet SET progress_05 = "..pet_glob_table[pc.get_name()][13].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"},
				[14] = {"UPDATE "..get_db_player()..".pet SET progress_05_temp = "..pet_glob_table[pc.get_name()][14].." WHERE pet.player_id = "..pc.get_player_id().." AND pet.num = "..petID.." LIMIT 1;"}
			})[tableRow][1]
		end

		

---- The rest of the code got deleted , the quest have 1012 lines

@Think you are a genius

Edited by Exygo
Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now

Announcements



  • Similar Content

  • Activity

    1. 11

      Multi Language System

    2. 0

      [FREE DESIGN] Interface + Logo + Discord Banner and Avatar

    3. 4

      Feeding game source to LLM

    4. 0

      Quest 6/7 Problem

    5. 5

      Effect weapons

    6. 0

      [C++] Fix Core Downer Using Negative Number in GM Codes

    7. 3

      Crystal Metinstone

    8. 4

      Feeding game source to LLM

  • Recently Browsing

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

Terms of Use / Privacy Policy / Guidelines / We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.