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

Need Help With [VIP]

Cheeze1

Banned User
Joined
Mar 7, 2012
Messages
54
Reaction score
0
Location
IM OTLAND BIGGEST GAY WHORE!!
YO otland I have a ot working fine also i got VIP system Working fine to but... you guys know how to fix that its Come "VIP" above you
? [Bad english sry] However Storage :
PHP:
11333
Whole VIP Script
PHP:
function onUse(cid, item, fromPosition, itemEx, toPosition)

	if getPlayerStorageValue(cid,11333) < 1 then
		if getPlayerLevel(cid) > 1 then
			getPlayerStorageValue(cid, 11333)
			doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED) 
			doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP for Endless of days! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
			setPlayerStorageValue(cid, 11333, (getPlayerStorageValue(cid,11333) + 15))
			doRemoveItem(item.uid, 1)
		else
			doPlayerSendCancel(cid,"You need to be at least level 2 to use this.")
			doRemoveItem(item.uid, 1)
		end
	else
		doPlayerSendCancel(cid,"You are already Got Vip ;)")
	end	
return TRUE
end
Thank YOu rep+
 
Last edited:
Maybe something like this? :p

Globalevents...

XML:
    <globalevent name="vipEffect" interval="2" script="vipEffect.lua"/>

Code:
[COLOR=#aa9900][B]function[/B][/COLOR] onThink[COLOR=#66cc66]([/COLOR]interval[COLOR=#66cc66],[/COLOR] lastExecution[COLOR=#66cc66])[/COLOR]          
[COLOR=#aa9900][B]                for[/B][/COLOR] _[COLOR=#66cc66],[/COLOR] name [COLOR=#aa9900][B]in[/B][/COLOR] [COLOR=#0000aa]ipairs[/COLOR][COLOR=#66cc66]([/COLOR]getOnlinePlayers[COLOR=#66cc66]([/COLOR][COLOR=#66cc66])[/COLOR][COLOR=#66cc66])[/COLOR] [COLOR=#aa9900][B]do[/B][/COLOR]          
[COLOR=#aa9900][B]                local[/B][/COLOR] cid [COLOR=#66cc66]=[/COLOR] getPlayerByName[COLOR=#66cc66]([/COLOR]name[COLOR=#66cc66])[/COLOR]                
                     [COLOR=#aa9900][B]if[/B][/COLOR] getPlayerVipDays[COLOR=#66cc66]([/COLOR]cid[COLOR=#66cc66])[/COLOR] [COLOR=#66cc66]>=[/COLOR] [COLOR=#cc66cc]1[/COLOR] [COLOR=#aa9900][B]then[/B][/COLOR]                   
                        doSendMagicEffect[COLOR=#66cc66]([/COLOR]getPlayerPosition[COLOR=#66cc66]([/COLOR]cid[COLOR=#66cc66])[/COLOR][COLOR=#66cc66],[/COLOR] [COLOR=#cc66cc]27[/COLOR][COLOR=#66cc66])[/COLOR]                   
                        doSendAnimatedText[COLOR=#66cc66]([/COLOR]getPlayerPosition[COLOR=#66cc66]([/COLOR]cid[COLOR=#66cc66])[/COLOR][COLOR=#66cc66],[/COLOR] [COLOR=#ff6666]"VIP!"[/COLOR][COLOR=#66cc66],[/COLOR] TEXTCOLOR_RED[COLOR=#66cc66])[/COLOR]                
[COLOR=#aa9900][B]                        end[/B][/COLOR]         
         [COLOR=#aa9900][B]end[/B][/COLOR]          [COLOR=#aa9900][B]
          return[/B][/COLOR] [COLOR=#aa9900]true[/COLOR] 
[COLOR=#aa9900][B]end[/B][/COLOR]
 
How the hack its gonna work without Storage Code and in Globalevent? wuut? umm anyways i tested it and it not working error
PHP:
[18/05/2012 09:58:13] [Error - GlobalEvent Interface] 
[18/05/2012 09:58:13] data/globalevents/scripts/vipEffect.lua:onThink
[18/05/2012 09:58:13] Description: 
[18/05/2012 09:58:13] data/globalevents/scripts/vipEffect.lua:4: attempt to call global 'getPlayerVipDays' (a nil value)
[18/05/2012 09:58:13] stack traceback:
[18/05/2012 09:58:13] 	data/globalevents/scripts/vipEffect.lua:4: in function <data/globalevents/scripts/vipEffect.lua:1>
[18/05/2012 09:58:13] [Error - GlobalEvents::think] Couldn't execute event: vipEffect
:S
 
You just have to change one line...

Code:
                     [COLOR=#aa9900][B]if[/B][/COLOR] getPlayerVipDays[COLOR=#66cc66]([/COLOR]cid[COLOR=#66cc66])[/COLOR] [COLOR=#66cc66]>=[/COLOR] [COLOR=#cc66cc]1[/COLOR] [COLOR=#aa9900][B]then[/B][/COLOR]
 
here's the globalevents

LUA:
function onThink(interval, lastExecution)

local pos = {x=179, y=161, z=7}
local text = "Vip"
local effect = 35
doSendAnimatedText(pos, text, effect)
doSendMagicEffect(pos, 27)
doSendMagicEffect(pos, 25)
return TRUE
end

XML:
<globalevent name="vipenter" interval="1" event="script" value="vipenter.lua"/>
 
heres the vip scroll script either if u need

LUA:
function onUse(cid, item, frompos, item2, topos)

if item.itemid == 5785 then
if getPlayerLevel(cid) > 1 then
getPlayerStorageValue(cid, 11333)
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)
doSendMagicEffect(topos, 61)
doSendMagicEffect(topos, 25)
doCreatureSay(cid, "Congratulations, You are now a VIP and can enter to the VIP area. ", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 11333, 1)
doRemoveItem(item.uid, 1)
else
doPlayerSendCancel(cid,'You are not a donator.')
doRemoveItem(item.uid, 1)
end
else
end
return 1
end

XML:
 <action itemid="5785" event="script" value="other/vip.lua"/>
 
Back
Top