• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

Auto Seller

chackie

New Member
Joined
Nov 1, 2009
Messages
87
Reaction score
0
Auto Seller?
When you have been hunting and loot much you should be able to check in loot-bag and get cash instantly! :w00t: Can not do script exactly. I ask nicely someone who could do this :)

A better explanation with images!
You come to town. Have a loot-bag with lots of dragon shield in, example. And put it on the basin cup pressing the lever. And you get cash in the backpack.



After press lever



You should be able to sell almost anything.

ALL EQUIMENTS
Code:
			dark helmet,2490,1000;
			brass helmet,2460,120;
			chain helmet,2458,52;
			helmet of the deep,5461,5000;
			iron helmet,2459,390;
			leather helmet,2461,12;
			party hat,6578,600;
			soldier helmet,2481,110;
			steel helmet,2457,580;
			studded helmet,2482,60;
			viking helmet,2473,265;
			
			leather boots,2643,2;
			sandals,2642,2;
			
			studded armor,2484,90;
			spirit cloak,8870,1000;
			scale armor,2483,260;
			ranger's cloak,2660,450;
			plate armor,2463,1200;
			magician's robe,8819,450;
			leather armor,2467,25;
			jacket,2650,10;
			green tunic,2652,25;
			ethno coat,8892,750;
			doublet,2485,16;
			coat,2651,8;
			chain armor,2464,200;
			cape,2654,9;
			brass armor,2465,450;
			belted cape,8872,1300;
			noble armor,2486,8000;
			dark armor,2489,1500;
			
			ancient shield,2532,5000;
			brass shield,2511,65;
			dwarven shield,2525,500;
			plate shield,2510,125;
			steel shield,2509,200;
			studded shield,2526,50;
			viking shield,2531,260;
			wooden shield,2512,13;
			
			studded legs,2468,60;
			leather legs,2649,9;
			chain legs,2648,80;
			brass legs,2487,195
		" />
		<parameter key="shop_sellable" value="
			warrior helmet,2475,5000;
			viking helmet,2473,66;
			tribal mask,3967,250;
			terra hood,7903,2500;
			studded helmet,2482,20;
			strange helmet,2479,500;
			steel helmet,2457,293;
			skull helmet,5741,40000;
			ragnir helmet,7462,400;
			pirate hat,6096,1000;
			pair of earmuffs,7459,1500;
			magma monocle,7900,2500;
			mage hat,8820,150;
			lightning headband,7901,2500;
			legion helmet,2480,22;
			leather helmet,2461,4;
			krimhorn helmet,7461,200;
			iron helmet,2459,150;
			horseman helmet,3969,280;
			royal helmet,2498,30000;
			warrior helmet,2475,5000;
			crusader helmet,2497,6000;
			crown helmet,2491,2500;
			devil helmet,2462,1000;
			mystic turban,2663,150;
			chain helmet,2458,17;
			iron helmet,2459,150;
			dark helmet,2490,250;
			strange helmet,2479,500;
			batwing hat,10016,8000;
			beholder helmet,3972,3000;
			brass helmet,2460,30;
			charmer's tiara,3971,900;
			feather headdress,3970,850;
			glacier mask,7902,2500;
			helmet of the deep,5461,5000;
		
			steel boots,2645,30000;
			boots of haste,2195,30000;
			crocodile boots,3982,1000;
			fur boots,7457,2000;
			glacier shoes,7892,2500;
			leather boots,2643,2;
			lightning boots,7893,2500;
			magma boots,7891,2500;
			patched boots,2641,2000;
			pirate boots,5462,3000;
			terra boots,7886,2500;
		
			dragon scale mail,2492,40000;
			golden armor,2466,20000;
			crown armor,2487,12000;
			knight armor,2476,5000;
			blue robe,2656,10000;
			plate armor,2463,400;
			brass armor,2465,150;
			chain armor,2464,70;
			crown armor,2487,12000;
			noble armor,2486,900;
			dark armor,2489,400;
			belted cape,8872,500;
			brass armor,2465,150;
			coat,2651,1;
			crystalline armor,8878,16000;
			doublet,2485,3;
			dwarven armor,2503,30000;
			ethno coat,8892,200;
			focus cape,8871,6000;
			glacier robe,7897,11000;
			hibiscus dress,8873,3000;
			jacket,2650,1;
			leather armor,2467,12;
			leopard armor,3968,1000;
			lightning robe,7898,11000;
			magma coat,7899,11000;
			mammoth fur cape,7463,6000;
			paladin armor,8891,15000;
			pirate shirt,6095,500;
			red robe,2655,300;
			scale armor,2483,75;
			skullcracker armor,8889,18000;
			spirit cloak,8870,350;
			studded armor,2484,25;
			swamplair armor,8880,16000;
			terra mantle,7884,11000;

			brass legs,2487,49;
			crown legs,2488,12000;
			knight legs,2477,5000;
			plate legs,2647,115;
			bast skirt,3983,750;
			chain legs,2648,25;
			glacier kilt,7896,11000;
			leather legs,2649,9;
			lightning legs,7895,11000;
			magma legs,7894,11000;
			mammoth fur shorts,7464,850;
			pirate knee breeches,5918,200;
			studded legs,2468,15;
			terra legs,7885,11000;
		
			beholder shield,2518,1000;
			crown shield,2519,8000;
			demon shield,2520,30000;
			dragon shield,2516,4000;
			dwarven shield,2525,100;
			guardian shield,2515,2000;
			medusa shield,2536,9000;
			phoenix shield,2539,16000;
			tower shield,2528,8000;
			vampire shield,2534,15000;
			ancient shield,2532,900;
			battle shield,2513,95;
			black shield,2529,800;
			bone shield,2541,80;
			brass shield,2511,25;
			castle shield,2535,5000;
			copper shield,2530,50;
			dark shield,2521,400;
			norse shield,7460,1500;
			plate shield,2510,45;
			salamander shield,3975,280;
			scarab shield,2540,2000;
			sentinel shield,3974,120;
			steel shield,2509,80;
			studded shield,2526,16;
			tortoise shield,6131,150;
			tusk shield,3973,850;
			viking shield,2531,85;
			wooden shield,2512,5;
			spellbook of enlightenment,8900,4000;
			spellbook of warding,8901,8000;
			spellbook of mind control,8902,13000;
			spellbook of lost souls,8903,19000

ALL WEAPONS
Code:
			serpent sword,2409,6000;
			spike sword,2383,8000;
			short sword,2406,30;
			sword,2376,85;
			ice rapier,2396,5000;
			rochhill sword,2395,473;
			crimson sword,7385,610;
			dagger,2379,5;
			jagged sword,8602,500;
			longsword,2397,160;
			machete,2420,35;
			rapier,2384,15;
			sabre,2385,25;
			two handed sword,2377,950;
				
			axe,2386,20;
			barbarian axe,2429,590;
			battle axe,2378,235;
			hand axe,2380,8;
			hatchet,2388,85;
			obsidian lance,2425,3000;
			sickle,2405,7;
			steel axe,8601,500;
				
			battle hammer,2417,350;
			clerical mace,2423,540;
			club,2382,5;
			crowbar,2416,260;
			daramanian mace,2439,500;
			mace,2398,90;
			morning star,2394,430;
			scythe,2550,12;
			staff,2401,40;
			war hammer,2391,10000
		" />
		<parameter key="shop_sellable" value="
			broad sword,2413,500;
			earth spike sword,7854,1000;
			energy spike sword,7869,1000;
			fiery spike sword,7744,1000;
			fire sword,2392,4000;
			giant sword,2393,17000;
			ice rapier,2396,1000;
			icy spike sword,7763,1000;
			serpent sword,2409,900;
			short sword,2406,10;
			spike sword,2383,1000;
			sword,2376,25;
			osbrooken sword,7391,16000;
			assassin dagger,7404,20000;
			berserker,7403,40000;
			blacksteel sword,7406,1000;
			rochhill sword,2395,118;
			crystal sword,7449,600;
			dagger,2379,2;
			demonrage sword,7382,36000;
			dragon slayer,7402,15000;
			earth blacksteel sword,7857,1000;
			earth dragon slayer,7858,15000;
			earth mystic blade,7856,30000;
			earth relic sword,7855,25000;
			energy blacksteel sword,7872,1000;
			energy dragon slayer,7873,15000;
			energy mystic blade,7871,30000;
			energy relic sword,7870,25000;
			epee,2438,8000;
			fiery blacksteel sword,7747,1000;
			fiery dragon slayer,7748,15000;
			fiery mystic blade,7746,30000;
			fiery relic sword,7745,25000;
			haunted blade,7407,8000;
			heavy machete,2442,90;
			icy blacksteel sword,7766,1000;
			icy dragon slayer,7767,15000;
			icy mystic blade,7765,30000;
			icy relic sword,7764,25000;
			justice seeker,7390,60000;
			katana,2412,35;
			knife,2403,1;
			longsword,2397,51;
			machete,2420,6;
			mercenary sword,7386,12000;
			mystic blade,7384,30000;
			nightmare blade,7418,35000;
			poison dagger,2411,50;
			rapier,2384,7;
			relic sword,7383,25000;
			sabre,2385,12;
			scimitar,2419,150;
			silver dagger,2402,500;
			templar scytheblade,3963,200;			
			two handed sword,2377,450;
			wyvern fang,7408,1500;
			
			angelic axe,7436,5000;
			battle axe,2378,80;
			butcher's axe,7412,18000;
			double axe,2387,260;
			dragon lance,2414,9000;
			fire axe,2432,8000;
			glorious axe,7454,3000;
			guardian halberd,2427,11000;
			halberd,2381,400;
			hatchet,2388,25;
			knight axe,2430,2000;
			obsidian lance,2425,500;
			royal axe,7434,60000;
			axe,2386,7;
			barbarian axe,2429,185;
			beastslayer axe,3962,1500;
			daramanian waraxe,2440,1000;
			dreaded clever,7419,15000;
			earth barbarian axe,7859,185;
			earth headchopper,7862,1000;
			earth heroic axe,7861,30000;
			earth knight axe,7860,2000;
			earth war axe,7863,12000;
			energy barbarian axe,7874,185;
			energy headchopper,7877,1000;
			energy heroic axe,7876,30000;
			energy knight axe,7875,2000;
			energy war axe,7878,12000;
			fiery barbarian axe,7749,185;
			fiery headchopper,7752,1000;
			fiery heroic axe,7751,30000;
			fiery knight axe,7750,2000;
			fiery war axe,7753,12000;
			hand axe,2380,5;
			headchopper,7380,1000;
			heroic axe,7389,30000;
			icy barbarian axe,7768,185;
			icy headchopper,7771,1000;
			icy heroic axe,7770,30000;
			icy knight axe,7769,2000;
			icy war axe,7772,12000;
			naginata,2426,2000;
			noble axe,7456,10000;
			orcish axe,2428,350;
			ornamented axe,7411,20000;
			ripper lance,3964,500;
			ruthless axe,6553,45000;
			sickle,2405,3;
			titan axe,7413,4000;
			vile axe,7388,30000;
			war axe,2454,12000;
			
			battle hammer,2417,120;
			blessed sceptre,7429,60000;
			clerical mace,2423,170;
			cranial basher,7415,30000;
			dragon hammer,2434,2000;
			mace,2398,30;
			orcish maul,7392,1000;
			queen's sceptre,7410,20000;
			shadow sceptre,7451,10000;
			skull staff,2436,6000;
			war hammer,2391,1200;
			abyss hammer,7414,20000;
			amber staff,7426,8000;
			banana staff,3966,1000;
			bone club,2449,5;
			bonebreaker,7428,10000;
			brutetamer's staff,7379,1500;
			chaos mace,7427,9000;
			club,2382,1;
			crowbar,2416,50;
			crystal mace,2445,20000;
			daramanian mace,2439,110;
			diamond sceptre,7387,3000;
			dragonbone staff,7430,3000;
			earth clerical mace,7864,170;
			earth cranial basher,7866,30000;
			earth crystal mace,7865,20000;
			earth orcish maul,7867,1000;
			earth war hammer,7868,1200;
			energy clerical mace,7879,170;
			energy cranial basher,7881,30000;
			energy crystal mace,7880,20000;
			energy orcish maul,7882,1000;
			energy war hammer,7883,1200;
			fiery clerical mace,7754,170;
			fiery cranial basher,7756,30000;
			fiery crystal mace,7755,20000;
			fiery orcish maul,7757,1000;
			fiery war hammer,7758,1200;
			furry club,7432,1000;
			giant smithhammer,2321,250;
			hammer of wrath,2444,30000;
			heavy mace,2452,50000;
			icy clerical mace,7773,170;
			icy cranial basher,7775,30000;
			icy crystal mace,7774,20000;
			icy orcish maul,7776,1000;
			icy war hammer,7777,1200;
			jade hammer,7422,25000;
			lich staff,3961,10000;
			lunar staff,7424,5000;
			mammoth whopper,7381,300;
			morning star,2394,100;
			onyx flail,7421,22000;
			sapphire hammer,7437,7000;
			scythe,2550,10;
			spiked squelcher,7452,5000;
			studded club,2448,10;
			taurus mace,7425,500

rep++
 
Last edited:
this maybe very messy, if you couldnt find any thing else and this was you last choice then use it :p

If a container is placed then it will check inside it for items, if none are sellable [referring to the table list inside script] or container is empty it will give cancel, or you can just put a single item and sell it.
Lua:
local items = {  -- you need to set up all items here where :
					[2466] = {cost = 1000},
					[2446] = {cost = 3000},
					[2470] = {cost = 4000},
					}
					
					
local basin = {x=990,y=1000,z=7,stackpos = 1}	-- basin pos


				
-- // SCRIPT START \\ --

function getContentDescription(uid, li)	 -- credits to Cyko for main form of this function
	local ret, i, containers,removes, left = {}, 0, {}, {}, {}
	
	while i <= getContainerSize(uid) do
		local v = getContainerItem(uid, i)
		local k = v.uid
		local k2 = v.itemid

		local check = items[k2]
		if check then
			table.insert(ret, k2)
			table.insert(removes,k)
		end
		if isContainer(k) then
				table.insert(containers, k)
		end
		i = i + 1
	end
	for i = 1, #containers do
		local bah = getContentDescription(containers[i], li)
		for i = 1,#bah do
			if li == 1 then
				table.insert(removes,bah[i])
			elseif li == 2 then	
				table.insert(ret,bah[i])
			end
		end
	end
	return li== 1 and removes or ret 
end

function getKey(t)
	local s = {}
	for k,v in pairs(t) do
		table.insert(s,k)
	end
	return s
end
function onUse(cid, item, fromPosition, itemEx, toPosition)
local exist = getThingFromPos(basin).uid
local itm = getThingFromPos(basin).itemid

	if isContainer(exist) then
		local t = getContentDescription(exist,2)
		local t2 = getContentDescription(exist,1)
		if #t > 0 then
			local f = {}
			for i = 1,#t do
				if not isInArray(getKey(f),t[i]) then
					f[t[i]] = 1
				else
					f[t[i]] = f[t[i]] + 1
				end
			end
			local str = "Sold items : "
			local money = 0
			for k,v in pairs(f) do
				str = str.."\n".."•••• "..v.."x "..getItemNameById(k).." : ".. ( tonumber(items[k].cost) * tonumber(v) ) .. " gold coins."
				money = money + tonumber(items[k].cost) * tonumber(v)
			
			end
			for i = 1,#t2 do
				doRemoveItem(t2[i])
			end
			doPlayerSendTextMessage(cid,27,str)
			doPlayerAddMoney(cid,money)
			if #t > 1 then
				doPlayerSendTextMessage(cid,19," Total money : ".. money.." gold coins.")
			end
		else
			doPlayerSendTextMessage(cid,18,"Warning : Sold nothing --> either bag is empty or items included arn't sellable here.")
			doSendMagicEffect(fromPosition,2)
			
		end
	else
		local merge = items[itm]
		if not merge then
			doPlayerSendTextMessage(cid,18,"Warning : This item isn't sellable here.")
			doSendMagicEffect(fromPosition,2)
			
		else
			doRemoveItem(exist)
			doPlayerSendTextMessage(cid,27,"Sold item : \n •••• 1x "..getItemNameById(itm).." : "..merge.cost.."." )
			doPlayerAddMoney(cid,merge.cost)
		end
			
	end
	return doTransformItem(item.uid,item.uid == 1945 and 1946 or 1945)
end
 
Last edited:
The action lever did not react.
Lever Action Id: 5887. I had put this code in action folder
Code:
	<action itemid="5887" event="script" value="other/auto.lua"/>

I get non respond when I pull the lever. There is no error in the. Exe when starting the server or when I pulled the lever.
 
Lua:
<action actionid="5887" event="script" value="other/auto.lua"/>

then u put the actionid 5887 on lever, adjust the basin position.
 
Yes i did put action id on lever and changed basin position
Code:
local basin = {x=1109,y=1078,z=7,stackpos = 1} -- basin pos
Mine basin position.

No react
 
Code:
<action [B][I][FONT="Book Antiqua"][SIZE="3"][COLOR="red"]actionid="5887"[/COLOR][/SIZE][/FONT][/I][/B] event="script" value="other/auto.lua"/>

have u did it like that upp?? changes the itemd id to actionid in your line in action.xml?
 
<action actionid="5887" event="script" value="other/auto.lua"/>

Actionid... lol Should try now lol thanks :p feel little bit stupid x)
 
Back
Top