Jump to content

pollux

Honorable Member
  • Posts

    264
  • Joined

  • Days Won

    23
  • Feedback

    0%

Posts posted by pollux

  1. It should because i have other quests in which this actually is working.

     

    But i changed the following things:

    - moved the items array behind the 'when'

    - changed line 64 (color_hair.items[f] -> items[f]

    - added pc.remove_item(10049, 1) on line 36

    - added a say to line 55

     

    Quest:

     

    ----------------------------------------------------
    -- created @ 2016-10-22 7:58 PM
    -- by .PolluX
    -- for Electryced2
    ----------------------------------------------------
    quest color_hair begin
    	state start begin
    
    		-------------------------
    		-- SETTINGS
    		-------------------------		
    		function translate()
    			local translate = {
    				title = "Hair-Styling",
    				
    				dialog_start = "Herzlichen Glückwunsch![ENTER]Sie wurden ausgewählt eine neue Methode der [ENTER]Haarfärbung zu testen. Bitte wählen Sie [ENTER]die gewünschte Farbe aus![ENTER]",
    				dialog_choose = "[ENTER][ENTER]Bist du dir sicher, dass du dieses[ENTER]Färbemittel erhalten möchtest?[ENTER]",
    				
    				select_title = "Soll es wirklich diese Farbe sein?",
    				select_1 = "Her damit!",
    				select_2 = "Ne, doch lieber etwas anderes.",
    				
    				success = "Du hast das Haarfärbemittel in der gewünschten Farbe erhalten.",
    			}
    			
    			return translate
    		end
    		
    		function generateOutput(value)
    			say_title(color_hair.translate().select_title)
    			say_item(item_name(value),value,"")
    			local s = select(color_hair.translate().select_1, color_hair.translate().select_2)
    			if(s == 1) then
    				chat(color_hair.translate().success)
    				pc.give_item2(value, 1)
    				pc.remove_item(10049, 1)
    			end
    		end
    		
    		-------------------------
    		-- QUEST START
    		-------------------------
    		when 10049.use begin
    		
    			local items = {
    				70202, -- white
    				70203, -- blonde
    				70204, -- red
    				70205, -- brown	
    				70206, -- black
    				70201, -- reset
    			}
    		
    			say_title(color_hair.translate().title)
    			say(color_hair.translate().dialog_start)
    			
    			local f = select ("Weißes Färbemittel", -- 1
    										"Blondes Färbemittel", -- 2
    										"Rotes Färbemittel", -- 3
    										"Braunes Färbemittel", -- 4
    										"Schwarzes Färbemittel", -- 5
    										"Bleichmittel") -- 6
    			
    			color_hair.generateOutput(items[f])
    			
    		end
    	end
    end

     

     

    Now it's working :)

  2. error message:

    pollux/color_hair.lua:12:expecting 'when' or 'function'
    Error occured on compile pollux/color_hair.lua

     

    quest:

    ----------------------------------------------------
    -- created @ 2016-10-22 7:58 PM
    -- by .PolluX
    -- for Electryced2
    ----------------------------------------------------
    quest color_hair begin
    	state start begin
    
    		-------------------------
    		-- SETTINGS
    		-------------------------
    		local items = {
    			         0, -- dummy item
    			70202, -- white
    			70203, -- blonde
    			70204, -- red
    			70205, -- brown	
    			70206, -- black
    			70201, -- reset
    		}
    		
    		function translate()
    			local translate = {
    				title = "Hair-Styling",
    				
    				dialog_start = "[ENTER][ENTER]Herzlichen Glückwunsch![ENTER]Sie wurden ausgewählt eine neue Methode der Haarfärbung[ENTER]zu testen. Bitte wählen Sie die gewünschte Farbe aus![ENTER]",
    				dialog_choose = "[ENTER][ENTER]Bist du dir sicher, dass du dieses[ENTER]Färbemittel erhalten möchtest?[ENTER]",
    				
    				select_title = "Soll es wirklich diese Farbe sein?",
    				select_1 = "Her damit!",
    				select_2 = "Ne, doch lieber etwas anderes.",
    				
    				success = "Du hast das Haarfärbemittel in der gewünschten Farbe erhalten.",
    			}
    			
    			return translate
    		end
    		
    		function generateOutput(value)
    			say_title(color_hair.translate().select_title)
    			say_item(item_name(value),value,"")
    			local s = select(color_hair.translate().select_1, color_hair.translate().select_2)
    			if(s == 1) then
    				chat(color_hair.translate().success)
    				pc.give_item2(value, 1)
    			end
    		end
    		
    		-------------------------
    		-- QUEST START
    		-------------------------
    		when 38001.use begin
    			say_title(color_hair.translate().title)
    			color_hair.translate().dialog_start
    			
    			local f = select ("Weißes Färbemittel", -- 1
    										"Blondes Färbemittel", -- 2
    										"Rotes Färbemittel", -- 3
    										"Braunes Färbemittel", -- 4
    										"Schwarzes Färbemittel", -- 5
    										"Bleichmittel") -- 6
    			
    			color_hair.generateOutput(color_hair.items[f])
    			
    		end
    	end
    end

     

    Where did i fail? Tell me pls :D

  3. WeWantYou.png

     

    metin2dev.org is searching for new moderators!

     

    Requirements

    • no warnings received yet (or latest older than 1 year)
    • good english (not perfect but on a high level)
    • Skype (for better communication with other team members)
    • enough time to check all sections (~1h daylie)
    • 18 years or older
    • no bad reputation
    • not a member of any other team

     

    What do we expect in your application (information)?

    • Who are you?
    • experience as a moderator
    • strengths and weaknesses
    • Why should we choose you?
    • contact information

     

    Please send your written applications as a private message to @DevChuckNorris or @.PolluX until 6th November 2016.

  4. Spoiler

    shop.cpp

    
    // In CShop::Buy(LPCHARACTER ch, BYTE pos)
    // add before if (IsPCShop()) and after LPITEM pkSelectedItem = IT....
        ////// Fly Effect
        if (m_pkPC) {
            for (int i = 1; i < r_item.price+1; i=i+100000000)
                ch->CreateFly(4,m_pkPC); // 1 Fly per 100kk
            m_pkPC->CreateFly(5,ch); // 1 Item
            m_pkPC->CreateFly(6,ch);
        }
        // END FLY EFFECT

     

    exchange.cpp

    
    // in bool CExchange::Done()
    // before the loop
    GetOwner()->CreateFly(6,victim);
    // and after ITEM_MANAGER::instance().FlushDelayedSave(item);
    GetOwner()->CreateFly(5,victim);
    
    // after if (m_lGold){
    for (int i = 1; i < m_lGold+1; i=i+500000) 
                GetOwner()->CreateFly(4,victim);  // 1 Fly per 500k

     

    created by Mijago

     

    • Love 1
  5. 1 hour ago, Chris90909090909090 said:

    QUERY_ERROR: UPDATE player_index SET pid1=0 WHERE id=16

    maybe this one over here?

     

    What is your player_index table looking like? (Design Table -> Screenshot)

     

    Also please show us your player table info and the complete Query!

    1 hour ago, Chris90909090909090 said:

    mysql_query error: Column count doesn't match value count at row 1

     

×
×
  • 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.