ConAn Edujawa
Member
- Joined
- Feb 23, 2015
- Messages
- 457
- Reaction score
- 17
hello guys i use 0.4
i found this npc here
but i need to add items not premium days
my script look like
when tell npc 5 npc add just one demon horn not 5
i found this npc here
npc for premium days
hello guys anyone can help me in npc sell premium days for event token to be like this Playe : hi Npc : Hello (playername) I sell premium days for tokens tell me how many days you need to buy? player: for example 5 npc : do you need to buy 5 premium days for 5 tokens? player : yes Npc ...
otland.net
my script look like
Lua:
if msgcontains(msg, "demon horn") and talkState[talkUser] == 2 then
selfSay('Tell me how much you would like to purchase?', cid)
talkState[talkUser] = 29
elseif talkState[talkUser] == 29 and temp ~= nil and temp > 0 then
selfSay(" " .. msg .. " demon horn will cost you " .. msg*5 .. " power Tokens Do you agree?", cid)
xmsg[cid] = msg
talkState[talkUser] = 30
elseif talkState[talkUser] == 30 and msgcontains(msg, "yes") then
local tempCount = tonumber(xmsg[cid])
if getPlayerItemCount(cid, 12372) >= tempCount*5 then
if doPlayerRemoveItem(cid,12372, tempCount*5) == TRUE then
doPlayerAddItem(cid, 12469, tempCount)
selfSay("Here you go!", cid)
end
else
selfSay("You don't have enough tokens for " .. xmsg[cid] .. " demon horn.", cid)
talkState[talkUser] = 0
end