• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

potion lever get 100x potion in same stack no need bp rep +++

Dramix

New Member
Joined
Jun 26, 2009
Messages
289
Reaction score
1
hello, i need a script when i use the lever i will get for example: 100x gmp's and it cost 15k gp, and when i use another lever i will get 100x shp and it cost 7k gp, i use 0.2.9 Mystic spirit. THX (rep+++)
 
Go remake script potion lever, removing backpacks and adding a thing: "doPlayerAddItem(cid, potionid, 100)"
 
data/actions/scripts/pots.lua
LUA:
local t = {
[2000] = {7590,100,15000},
[2001] = {7588,100,7000}
}

function onUse(cid, item, fromPosition, itemEx, toPosition)
local v = t[item.uid]
if v then
   if doPlayerRemoveMoney(cid,v[3]) then
      doPlayerAddItem(cid, v[1], v[2])
   else
       doPlayerSendCancel(cid, "You need " .. v[3] .. " gps to buy this")
   end
end
return true
end

actions.xml
XML:
<action uniqueid="2000-2001" event="script" value="pots.lua"/>

uniqueID 2000 for great manas and 2001 for shps
 
Back
Top