Jump to content

kubasiek221

Inactive Member
  • Posts

    12
  • Joined

  • Last visited

  • Feedback

    0%

Posts posted by kubasiek221

  1. Hay!

    I try add new system.

     

    This is oryginal topic:

     

     

     

    
    	
    		
    			
    				
    				SYSERR: Jan 11 18:18:37 :: RunState: LUA_ERROR: [string "mds"]:2: attempt to concatenate global `stan' (a nil value)
    				 
    				
    			
    		
    	
    
    
    
    

    Quest:

     
    quest mds begin
        state start begin
            when login begin
                loop_timer("czsss", 10)
            end
            when czsss.timer begin
                xx = query("SELECT cash FROM account.account WHERE id = '"..pc.get_account_id().."';")
                cmdchat("Mds "..xx)
            end
        end
    end
     
    If xx = mysql_query("SELECT cash from account.account WHERE id="..pc.get_account_id().." LIMIT 1;")[1][1] is the same errors in sysser.
    
     
    I modified this line:
    def __Mds(self, coins):
        import constInfo
        constInfo.mds = int(coins)
     
    Now is:
     
     
    def __Mds(self, cash):
        import constInfo
        constInfo.mds = int(cash)
     
    Maybe this run errors ?
     
    

     

     

    Where is a problem ?

  2. Hello people !

     

    My test quest does not worki.

    Sysser does not saves errors in the query but the communicats ( Your nick is changed...") its show.

    Why this query not work ?

     

    My quest:

    quest names begin
        state start begin
            when login begin
                names = "[VIP] "..pc.get_name()..""
                query("UPDATE player.player SET name="..names.." WHERE account_id = '"..pc.get_account_id().."';")
                syschat("Your nick is changed. Please logut now.")
            end
        end
    end
    
    

    Update

     

    My new quest working but in the game nothings change.

     

    Quest:

    quest names begin
        state start begin
            when login begin
                names = "[VIP] "..pc.get_name()..""
                query("UPDATE player.player SET name='"..names.."' WHERE account_id = '"..pc.get_account_id().."';")
                syschat("Your nick is changed. Please logut now.")
            end
        end
    end
    

    Screens:

    http://scr.hu/1wsp/4v2w9
    http://scr.hu/1wsp/fci0b
  3. Hay, I fix the problem, but i have new problem.

    Quest not checkingmy condition ( if id1 >= 100 then ). When click "Continue" nothing happens.

    Why ?

    quest test begin
        state start begin
            when 9001.click begin
                say_title(" xx ")
                local cena = 100
                local id1 = query("SELECT cash FROM account.account WHERE id ='"..pc.get_account_id().."';")
                say(" State your money : "..id1.." ")
                wait()
                if id1 >= 100 then -- this if does not work
                    query("UPDATE account.account SET cash=cash-"..cena.." WHERE id='"..pc.get_account_id().."';")
                    local current = id1-100
                    say("Current state your money:: "..current.." ")
                else
                    local new = 100-id1
                    say(" Your money is so small, you need: "..new.." SM! ")
                end
            end
        end
    end
    
  4. Hey!

     

    My quest does not work.

    Query UPDATE does not update the record mysql with cash. Why ?

    State coins shows correctly.

    How fix the problem ?

    Please, help me.

    http://wklej.to/FVkvp
    

    quest test begin
    	state start begin
    		when 9001.click begin
    			say_title(" xx ")
    			local cost = 100
    			local id1 = query("SELECT cash FROM account.account WHERE id ='"..pc.get_account_id().."';")
    			say(" Current state your coins: "..id1.." ")
    			wait()
    			query("UPDATE account.account SET cash=cash-"..cost.." WHERE id='"..id1.."';")
    			say(" Click continue ")
    			wait()
    			say("Your money: "..id1)
    		end
    	end
    end
    
  5. @Up

     

    I fix the problem.

    But i don`t now to how make time to minutes and seconds.

     

    Np:

    4 minutes time

     

    say( 3 minutes 43 seconds left )

     

    Do you now to how make this ?

    pc.setqf("change", get_time()+60*4) -- 4 minutes
    time2 = pc.getqf("change") - get_time()
                time = time2/60
                times = time2
                sec = math.floor(times)
                min = math.floor(time)
                syschat(" Change is possible for "..min.." min ! | "..times.." s ! ") -- how make to time for minutes and seconds ? Np. 3 minutes 44 seconds left.
    

     

     

  6. @Up

     

    Ques does not work.

    Time no working.
    All time is 15 minutes
    When I click "change" nothing is changed. Quest turns off.

    The rest of the quest does not work at

     

    quest change_item begin
        state start begin
            when 9003.take begin
                if pc.getqf("change") <= 5 then
                    say_title(" change : ")
                    say("")
                    say(" Hello "..pc.name..". I can change your items ")
                    say(" If you want, I can change your old items to new")
                    say(" ")
                    say(" If you dont like it, always can you come back. ")
                    local s = select("Change", "Back")
                    if s == 2 then return end
                        pc.setqf("change", pc.getqf("change")+1)
                        local item = { 10, 11, 12, 13, 14, 15, 16 }
                        local itemsss = 0
                        for i = 1, table.getn(item) do
                        if item.get_vnum(item[i]) == item[i] then
                        itemsss = itemsss +1
                            pc.give_item2(71085, 10)
                        end
                    end
                        if itemsss == 0 then
                        syschat(" This items can`t  be change ")
                    end    
                else
                pc.setqf("change", get_global_time()+60*15) -- 15 minutes
                local time2 = pc.getqf("change") - get_global_time()
                local time = time2/60
                local min = math.floor(time)
                syschat(" change can possible "..time.." minutes ")
                    if get_global_time() > pc.getqf("change") then
                        pc.setqf("change", 0)
                    end
                end
            end
        end
    end
    
×
×
  • 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.