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

[Action] Vip Scroll Scripting little problem...

Xeikh

詠春 ☯
Joined
Oct 23, 2009
Messages
724
Reaction score
17
Hello!
Im using this vip script:

function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVipDays(cid) > 365 then
doPlayerSendCancel(cid, "You can only have 1 year of vip account or less.")
else
doAddVipDays(cid, 30)
doSendMagicEffect(getPlayerPosition(cid), 36)
doSendAnimatedText(getPlayerPosition(cid), "V.I.P.", TEXTCOLOR_RED)
doPlayerPopupFYI(cid, "We have added 30 vip days to your account!\nEnjoy it!.")
doRemoveItem(item.uid)
end
return true
end

But if i have like 10 scrolls in a slot and i use, remove the 10 scrolls... what i need is, if i use 1, just remove 1 and not all the amount, can please someone help me please?

Btw. i want too.. to change the message "we have added...." instead of a popup, a console message.. please:$
 
are you talking about this
LUA:
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, "We have added 30 vip days to your account!\nEnjoy it!.")
instead of this
LUA:
doPlayerPopupFYI(cid, "We have added 30 vip days to your account!\nEnjoy it!.")
for this popup part?
 
are you talking about this
LUA:
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, "We have added 30 vip days to your account!\nEnjoy it!.")
instead of this
LUA:
doPlayerPopupFYI(cid, "We have added 30 vip days to your account!\nEnjoy it!.")
for this popup part?

Yes! Thx:3

Edit: Rep+ For u :3
 
and here, is the whole script, I think it works
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVipDays(cid) > 365 then
doPlayerSendCancel(cid, "You can only have 1 year of vip account or less.")
else
doAddVipDays(cid, 30)
doSendMagicEffect(getPlayerPosition(cid), 36)
doSendAnimatedText(getPlayerPosition(cid), "V.I.P.", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, "We have added 30 vip days to your account!\nEnjoy it!.")
doRemoveItem(item.uid, 1)
end
return true
end
btw ty for the rep :P
 
doRemoveItem(item.uid, 1) ?

LUA:
TEXTCOLOR_BLACK = 0
TEXTCOLOR_BLUE = 5
TEXTCOLOR_GREEN = 18
TEXTCOLOR_LIGHTGREEN = 66
TEXTCOLOR_DARKBROWN = 78
TEXTCOLOR_LIGHTBLUE = 89
TEXTCOLOR_MAYABLUE = 95
TEXTCOLOR_DARKRED = 108
TEXTCOLOR_DARKPURPLE = 112
TEXTCOLOR_BROWN = 120
TEXTCOLOR_GREY = 129
TEXTCOLOR_TEAL = 143
TEXTCOLOR_DARKPINK = 152
TEXTCOLOR_PURPLE = 154
TEXTCOLOR_DARKORANGE = 156
TEXTCOLOR_RED = 180
TEXTCOLOR_PINK = 190
TEXTCOLOR_ORANGE = 192
TEXTCOLOR_DARKYELLOW = 205
TEXTCOLOR_YELLOW = 210
TEXTCOLOR_WHITE = 215
TEXTCOLOR_NONE = 255

Perhaps TEXTCOLOR_TEAL or TEXTCOLOR_MAYABLUE ? dunno what version of TFS you are using also.
 
and here, is the whole script, I think it works
LUA:
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerVipDays(cid) > 365 then
doPlayerSendCancel(cid, "You can only have 1 year of vip account or less.")
else
doAddVipDays(cid, 30)
doSendMagicEffect(getPlayerPosition(cid), 36)
doSendAnimatedText(getPlayerPosition(cid), "V.I.P.", TEXTCOLOR_RED)
doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE, "We have added 30 vip days to your account!\nEnjoy it!.")
doRemoveItem(item.uid, 1) -- <<<<<<<<< had that :P
end
return true
end
already posted the doRemoveItem(item.uid, 1) :P, but thanks for posting the colors
 
Back
Top