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

Lua Shop lever

GOD Wille

Excellent OT User
Joined
Jan 11, 2010
Messages
2,826
Solutions
2
Reaction score
815
Location
Sweden
Does anyone know how to fix this:

When pushing the lever you got example mpa,

It cost 1 coin (custom made coin)


so something like that you buy mpa and it only works if you got example X itemid : x

after buying it, the itemid X removes and you got the mpa
 
PHP:
function onUse(cid, item, fromPosition, item2, toPositiom)
    if doPlayerRemoveItem(cid, XXXX,X) == true then
        doPlayerAddItem(cid, XXXX,X)
    else
        doPlayerSendCancel(cid, "Nigger..")
    end
return true
end
 
Since I basically gave you the idea in the other thread, obviusly I do have this script, here it is, full:

Code:
donationwand_id = 2184 -- Item to be sold
      custodonationwand_id = 200 -- Value

local name = getItemNameById(donationwand_id)
----- End Config -----
function onUse(cid, item, fromPosition, itemEx, toPosition)
        if doPlayerRemoveItem(cid, 6527, 200) == TRUE then
                local bag = doPlayerAddItem(cid, donationwand_id, 1)
                        doSendAnimatedText(fromPosition, "Donation", TEXTCOLOR_YELLOW)
                        doSendMagicEffect(fromPosition, math.random(1, 60) )
				doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You have purchased a ".. name .." for ".. custodonationwand_id .." donation coins.")
                  for i=1,1 do
                end
                else
                        doPlayerSendTextMessage(cid, MESSAGE_INFO_DESCR, "You need ".. custodonationwand_id .." donation coins for a ".. name ..".")
                end
        return FALSE
end

I guess you know that the upper part isnt enough to change the real value, that "Value" is just what it will be shown if you buy or cannot buy the item.
Rep++
 
Back
Top