Hey Guys,
i've tried to make a VIP Medal and now i get problems.
I am using the Real Server 3.3 (8.6).
Well, now the problem!
I've created in actions.xml this script
Now i've created in scripts folder, this one
When i try to test it, say the server.exe to me
Its doesn't work
Please help me!
i've tried to make a VIP Medal and now i get problems.
I am using the Real Server 3.3 (8.6).
Well, now the problem!
I've created in actions.xml this script
Code:
<action itemid="10136" event="script" value="vip.lua"/>
Now i've created in scripts folder, this one
Code:
local days = 30
local levelToBeVIP = 1
function onUse(cid, item, fromPosition, itemEx, toPosition)
if getPlayerLevel(cid) >= levelToBeVIP then
if isPlayerVip(cid) == FALSE then
doCreatureSay(cid, "Congratulations! You have now for "..days.." days VIP! You can now enter VIP-Areas!. ", TALKTYPE_ORANGE_1)
end
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
doPlayerAddVipDays(cid, days)
doRemoveItem(item.uid, 1)
doSendAnimatedText(getCreaturePosition(cid), "+"..days.." days", 30)
else
doPlayerSendCancel(cid, "You need level "..levelToBeVIP.." to be a VIP player.")
end
return TRUE
end
When i try to test it, say the server.exe to me
Code:
[17/06/2012 08:24:45] [Error - Action Interface]
[17/06/2012 08:24:45] data/actions/scripts/vip.lua:onUse
[17/06/2012 08:24:45] Description:
[17/06/2012 08:24:45] data/actions/scripts/vip.lua:6: attempt to call global 'isPlayerVip' (a nil value)
[17/06/2012 08:24:45] stack traceback:
[17/06/2012 08:24:45] data/actions/scripts/vip.lua:6: in function <data/actions/scripts/vip.lua:4>
Its doesn't work
Please help me!