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

Windows help with this script! D:

wafuboe

Active Member
Joined
Dec 24, 2010
Messages
884
Solutions
2
Reaction score
26
well i wanna make a vip coin (id9020) an with this coin u can buy vip items but i want to make a npc or a lever that uses vip coins instead of normal cash..

local keywordHandler = KeywordHandler:new()
local npcHandler = NpcHandler:new(keywordHandler)
NpcSystem.parseParameters(npcHandler)

function onCreatureAppear(cid) npcHandler:onCreatureAppear(cid) end
function onCreatureDisappear(cid) npcHandler:onCreatureDisappear(cid) end
function onCreatureSay(cid, type, msg) npcHandler:onCreatureSay(cid, type, msg) end
function onThink() npcHandler:onThink() end

local tabla = {
["boots of haste"] = {10, 9020},
["demon helmet"] = {11, 9020},
["frozen starlight"] = {30, 9020},
["spellbook of dark mysteries"] = {20, 9020},
["royal crossbow"] = {20, 9020},
["stuffed dragon"] = {30, 9020},
["star tear"] = {100, 9020},
["jester staff"] = {20, 9020},
["royal axe"] = {100, 9020},
["firewalker boots"] = {50, 9020},
["flame blade"] = {100, 9020}
}
function creatureSayCallback(cid, type, msg)
local s = getPlayerItemCount
local msgn = "You dont have the neccesary fire tokens for this!"
if (msgcontains(msg, 'trade')) and s(cid,9020) == 0 then
npcHandler:say('You dont have fire tokens', cid)

elseif msgcontains(msg, 'trade') and s(cid,9020) >= 1 then
npcHandler:say('You can change your fire tokens for, {boots of haste}, {demon helmet}, {frozen starlight}, {spellbok of dark mysteries}, {royal crossbow} y {stuffed dragon} ... And with more than 30 fire tokens for, {star tear}, {jester staff}, {vancini axe}, {flame blade} y {firewalker boots}', cid)
end
for txt, v in pairs(tabla) do
if msgcontains(msg, txt) then
if doPlayerRemoveItem(cid,9020,v[1]) then
doPlayerAddItem(cid,v[2],1)
npcHandler:say("You got a ".. getItemNameById(v[2]) .."!", cid)
else
npcHandler:say("".. msgn .."", cid)
end
end
end
return true
end
npcHandler:setCallback(CALLBACK_GREET, greetCallback)
npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
npcHandler:addModule(FocusModule:new())

it gives me one fire token instead of the selected item :/
can someone plzz fix my script or someone could give me a script perhaps that you buy with lever or the npc but using vip coin /id9020/

thanks :D
srry for my bad english ;S
 
every item number is "9020"
change the:
["boots of haste"] = {10, 9020},
to the item number

edit: item number as in the item number for boots of haste, demon helmet etc
 
Back
Top