• 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!

!buytools + !buy(items)

Joined
Jun 22, 2010
Messages
268
Solutions
1
Reaction score
5
Location
Usa, Utah
I need help with 2 scripts first one is broke, doesn't work at all + i need a 30minute exhaust on it.

The second script i wanna use to buy custom gear w/o a npc.


"this should give you a bp with a bow,rope,shovel,uh,sd,food, and a key

Code:
<talkactions>
<talkaction words="!buytools" scriprt="buytools.lua" />
</talkactions>

buytools.lua
LUA:
if doPlayerRemoveMoney(cid,10000) == TRUE then
doPlayerAddItem(cid,1988,1)
doAddContainerItem(1988, 2456, 1)
doAddContainerItem(1988, 2268, 1)
doAddContainerItem(1988, 2273, 1)
doAddContainerItem(1988, 2361, 1)
doAddContainerItem(1988, 2091, 1)
doAddContainerItem(1988, 7731, 1)
doAddContainerItem(1988, 5710, 1)
doPlayerSendTextMessage(cid,1,"Here are your tools!")
else
doPlayerSendTextMessage(cid,1,"Frodo: Sorry, you do not have enough money.")
	end
	return 1

end

-----------------------------------------------------------------

Now here is the second script
this will buy 1 inferno aol, i want this for donation items
was wondering if its possible to have multiple possibilities in 1 script. or if i just gotta make a ton of different scripts :P

Code:
<talkactions>
<talkaction words="!buytools" scriprt="buytools.lua" />
</talkactions>

LUA:
function onSay(cid, words, param)
if doPlayerRemoveItem(cid,6527,100) == TRUE or doPlayerRemoveItem(cid,7910,1) == TRUE then
doPlayerAddItem(cid,7890,1)
doPlayerSendTextMessage(cid,1,"Frodo: Here is your inferno amulet!")
else
doPlayerSendTextMessage(cid,1,"Frodo: Sorry, you do not have enough money.")
	end
	return 1

end
 
Hmm both of your scripts are name !buytools xd

First:
LUA:
function onSay(cid, words, param, channel)
	if doPlayerRemoveMoney(cid,10000) == TRUE and getPlayerStorageValue(cid, 59959) < os.time() then
		local bp = doPlayerAddItem(cid,1988,1)
		doAddContainerItem(bp, 2456, 1)
		doAddContainerItem(bp, 2268, 1)
		doAddContainerItem(bp, 2273, 1)
		doAddContainerItem(bp, 2361, 1)
		doAddContainerItem(bp, 2091, 1)
		doAddContainerItem(bp, 7731, 1)
		doAddContainerItem(bp, 5710, 1)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Frodo: Here are your tools!")
		setPlayerStorageValue(cid, 59959, os.time()+30*60*60)
	elseif getPlayerStorageValue(cid, 59959) then
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"You can only use this function once every 30 minutes.")
	else
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR,"Frodo: Sorry, you do not have enough money.")
	end
	
	return true
end

Second:
Something like (if you want it easy without arrays)
LUA:
if words == "!buydonation1" then

elseif words == "!buyarrow" then

elseif words == "!buyvipaccount" then

end
 
First: Nothing happens or it always says "Frodo: Sorry, you do not have enough money."
 
Change this line:
setPlayerStorageValue(cid, 59959, os.time()+30*60*60)

to:
setPlayerStorageValue(cid, 59959, os.time()+30*60)
 
Back
Top