Results 1 to 4 of 4

Thread: Juicy Actions

  1. #1
    Normal User
    Join Date
    Nov 2014
    Location
    Poland - podlaskie
    Posts
    132
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    28 Post(s)
    Reputation
    47
    Rep Power
    3

    Juicy Actions

    Hi. I have some free time so I decided to make some functions. Below, I will from time to time publish my functions and actions. If you have any suggestions pm to me or post here. Regards! TIPS: To use simply, paste the code to setup and then write the name of the function in action or wpt )

    Count Your Gold in all backpacks
    Lua Code:
     
    --- [[    Author: Juicy Scripts          ]] ---
    --- [[    Function name: Gold Counter    ]] ---
    --- [[    Version: 1.0.0                 ]] ---
     
    function goldinbackpack()
    	local coin = itemcount("gold coin")
    	local platinum = itemcount("platinum coin") * 100
    	local crystal = itemcount("crystal coin") * 10000
    	return coin + platinum + crystal
    end

    --- [[ Start example: ]]] ---
    PHP Code:
    if goldinbackpack() > 9500 then
      say
    ("hi")
      
    wait(800,1200)
      
    npcsay("trade")
      
    wait(800,1200)
      
    buysupplies()
      
    wait(800,1200)
    else
      
    gotolabel("GoToBank")
    end 
    --- [[ End example: ]]] ---
    Count your ammo in backpacks and ammoslot
    Lua Code:
     
    --- [[    Author: Juicy Scripts          ]] ---
    --- [[    Function name: Ammo Counter    ]] ---
    --- [[    Version: 1.0.0                 ]] ---
     
    function ammocount(NAME)
    	assert(([[string]]):find(type(NAME)), sprintf([[bad argument #1 to 'AmmoCount.NAME' (string expected, got %s)]], type(NAME)))
     
            local ammoslot = ammoamount
    	local ammocounts = itemcount(NAME)
     
     
    	return ammoslot + ammocounts
    end

    --- [[ Start example: ]]] ---
    PHP Code:
    if ammocount("prismatic bolt") > 650 and itemcount("strong mana potion") > 250 then
      gotolabel
    ("StartHunt")
    else
      
    gotolabel("LeaveCave")
    end 
    --- [[ End example: ]]] ---

    soon more

  2. #2
    iScripter Eli's Avatar
    Join Date
    Mar 2012
    Posts
    3,764
    Mentioned
    492 Post(s)
    Tagged
    2 Thread(s)
    Quoted
    955 Post(s)
    Reputation
    586
    Rep Power
    10
    Nice but we've got gold() function already

  3. #3
    Normal User
    Join Date
    Nov 2014
    Location
    Poland - podlaskie
    Posts
    132
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    28 Post(s)
    Reputation
    47
    Rep Power
    3
    fuck... i alltime used only "gold" without "()".... ;D and dont working for me, now im know why ... im idiot ok after maintenance i will share more actions ;p just test it ;]

  4. #4
    Normal User
    Join Date
    Nov 2014
    Location
    Poland - podlaskie
    Posts
    132
    Mentioned
    10 Post(s)
    Tagged
    0 Thread(s)
    Quoted
    28 Post(s)
    Reputation
    47
    Rep Power
    3
    Auto destiantion your loot list
    Lua Code:
     
    --- [[    Author: Juicy Scripts          ]] ---
    --- [[    Function name: Ammo Counter    ]] ---
    --- [[    Version: 1.0.0                 ]] ---
     
    function autodestination(MAINBP, LOOTBP, GOLDBP)
     assert(([[string]]):find(type(MAINBP)), sprintf([[bad argument #1 to 'AutoDestinyLoot.MAINBP' (string expected, got %s)]], type(MAINBP)))
     assert(([[string]]):find(type(LOOTBP)), sprintf([[bad argument #1 to 'AutoDestinyLoot.LOOTBP' (string expected, got %s)]], type(LOOTBP)))
     assert(([[string]]):find(type(GOLDBP)), sprintf([[bad argument #1 to 'AutoDestinyLoot.GOLDBP' (string expected, got %s)]], type(GOLDBP)))
     
    local GetListLoot = getlootitems()
    	for i = 0, GetListLoot.count-1 do
    		if GetListLoot[i].id == itemid("gold coin") then 
    			setsettings("Settings\\Looting\\List\\".. GetListLoot[i].name .."\\Destination", GOLDBP)
    		elseif GetListLoot[i].id == itemid("platinum coin") then 
    			setsettings("Settings\\Looting\\List\\".. GetListLoot[i].name .."\\Destination", MAINBP)
    		else
    			setsettings("Settings\\Looting\\List\\".. GetListLoot[i].name .."\\Destination", LOOTBP)
    		end
    	end
    end

    --- [[ Start example: ]]] ---
    PHP Code:
    autodestination("brocade backpack""beach backpack""golden backpack"
    Now your all loot list was updated
    --- [[ End example: ]]] ---

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •