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

Donation in Game

RunarM

Finally back
Joined
Jul 17, 2008
Messages
1,636
Reaction score
34
Location
Norway/Tromsø
How do i add Donation System in the Game?
Like, Training monk you need Donation to go here.

You understand?
Thanks =) ^^
 
First, you will need new vocations, then you will need a script that teleport "donation" players there.
 
You don't have to make a new vocation for donators that want to be able to enter "VIP zones".

You can use 'em as quests.
Example: You give a donator storage id 6000. VIP zone area entrance, only let storage id 6000 in.

Or you could also just use premium account for it.
 
This is one way to use it:
Code:
function onStepIn(cid, item, pos, frompos)
if isPlayer(cid) == TRUE and item.actionid == 6000 and getPlayerStorageValue(cid,6000) == 1 then
doTeleportThing(cid, {x=358, y=638, z=7})
doPlayerSendTextMessage(cid,22,"You're now in the VIP zone.")
else
doPlayerSendTextMessage(cid,22,"Sorry only VIP players, buy VIP access at our donation shop.")
doTeleportThing(cid, frompos)
end
end

Make an item that sets the players storage value to 6000, when he uses it.
I can post one later if you don't know how to do that. Gotta eat, ciao. :)
 
For example;

Could use
PHP:
setPlayerStorageValue(cid,12510,1)
to set the storage value

and
PHP:
if getPlayerStorageValue(cid,12510) == 1 then
to check if the player has the storagevalue or not.
 
Ah yeah, here's a "full" script for that.

Code:
function onUse(cid,item,frompos,item2,topos)
  queststatus = getPlayerStorageValue(cid,6000)
   		if queststatus == -1 then

   			setPlayerStorageValue(cid,6000,1)
        doRemoveItem(item.uid, 1)
        doSendMagicEffect(frompos, CONST_ME_FIREWORK_YELLOW)
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "You're now a VIP player!")
    else
        doPlayerSendTextMessage(cid, MESSAGE_STATUS_DEFAULT, "Sorry you already have VIP.")
    end
    return TRUE
end

If a player clicks on this, he'll get storage value 6000.
So if you use the other script I post also, he'll be able to enter the VIP zone. :)
 
Back
Top