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

Re scripting my donation system

PureDarkSlayer

New Member
Joined
Apr 10, 2009
Messages
62
Reaction score
3
I wanted to know how I would be able to rescript my donation system from 8.4 to 8.54. My donation system is based on coins. Please help :)
 
This is the VIP.lua:

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

if item.uid == 9999 and doPlayerRemoveItem(cid, 4351, 10) == TRUE then

if item.itemid == 1945 then
getPlayerStorageValue(cid, 11551)
doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED) 
doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1)
setPlayerStorageValue(cid, 11551, 1)
else
doPlayerSendCancel(cid,'You are not a donator.')
end
else
end
return 1
end

And this is donation levers to gain exp from them using donation coins the more you have the more exp you get:

PHP:
function onUse(cid, item, frompos, item2, topos)
	if item.uid == 9997 and doPlayerRemoveItem(cid, 4351, 2) == TRUE then

	if item.itemid == 1945 then
                   doPlayerSendTextMessage(cid,22,"You obtained 2 Billion and lost 2 donation coin.")
	doPlayerAddExp(cid,2000000000)
		doTransformItem(item.uid,item.itemid+1)
	elseif item.uid == 9997 and item.itemid == 1946 then
		doTransformItem(item.uid,item.itemid-1)
	end
	return 1
end
end
 
Lua:
function onUse(cid, item, fromPosition, itemEx, toPosition) 

	if item.uid == 9999 and doPlayerRemoveItem(cid, 4351, 10) == TRUE then 
		if item.itemid == 1945 then 
			if getPlayerStorageValue(cid, 11551) < 1 then 
				doSendAnimatedText(getPlayerPosition(cid), "Welcome!", TEXTCOLOR_RED)  
				doCreatureSay(cid, "CONGRATULATIONS! You are now a VIP! You can now enter the VIP-area and use unique features!. ", TALKTYPE_ORANGE_1) 
				setPlayerStorageValue(cid, 11551, 1) 
			else 
				doPlayerSendCancel(cid,'You are not a donator.') 
			end
		end
	end 
	return TRUE
end  

function onUse(cid, item, fromPosition, itemEx, toPosition)
	if item.uid == 9997 and doPlayerRemoveItem(cid, 4351, 2) == TRUE then 
    		if isInArray({1945, 1946}, item.itemid) then 
			doPlayerSendTextMessage(cid, 22, "You obtained 2 Billion and lost 2 donation coin.") 
    			doPlayerAddExp(cid, 2000000000) 
    		end 
		doTransformItem(item.uid, (item.itemid == 1945 and 1946 or 1945))
    		return TRUE
	end 
end
 
Ty have given rep to all of you only one small problem. My donation system is based on donation coins but when I re scripted everything to 8.54, I try to create my donation coins but in the version 8.54 it is a blank spot. Im not sure if the item does not exist anymore but it was a little red coin with a smile on it or a little face on it not sure what it is :p
 
Back
Top