• 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!
  • New resources must be posted under Resources tab. A discussion thread will be created automatically, you can't open threads manually anymore.

Action use Switch get vip By BlaZing King

BlaZing King

New Member
Joined
May 7, 2009
Messages
8
Reaction score
0
first in go in actions create a lua file vip switch.lua


copy this
Code:
----- By Blazing King ---
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 1945 or item.itemid == 1946 then
    if (item.uid==1005 or item.uid==1005) then
        if (getPlayerGroupId(cid)>=1) then
	   setPlayerStorageValue(cid, 11551, 1)
            doPlayerSendTextMessage(cid, 21, "Your Now A Vip User")
           elseif (getPlayerGroupId(cid)<1) then
        end
    end
end
return TRUE
end




then in actions actions.xml

copy this
Code:
	<action uniqueid="1005" script="vip switch.lua" />


it worked for me. Bye
Remember Its My First script:)
 
Last edited:
bump :)

i help u..

P.S its my little brother and.. script not works :S
so if u want, u can upgrade it so it works and u get credits :P

it was just a idea..
 
Pointless script unless VIP days can be removed.

LUA:
local storage = 12345
function onUse(cid, item, frompos, item2, topos)
    if item.itemid == 1945 and item.uid == 5000 then
	if getPlayerStorageValue(cid, storage) == TRUE then
	    doPlayerSendTextMessage(cid, MESSAGE_STATUS_CONSOLE_BLUE, "You are already a VIP Member.")
	else
	    setPlayerStorageValue(cid, storage, 1)
	    doPlayerSendTextMessage(cid, 21, "You are a now VIP Member.")
	end
    elseif item.itemid == 1946 then
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
    end
    return TRUE
end
 
Back
Top