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

Donate Script >edit< REP++

Shanksera

New Member
Joined
Sep 23, 2008
Messages
379
Reaction score
1
I've get a donate script with using a coin with command then you get x mln exp.

Code:
function onSay(cid, words, param)
local lvl = getPlayerLevel(cid)
if lvl <= 100 then
	experience = 40000000
	expmsg = "40 million"
elseif lvl > 100 and lvl <= 200 then
	experience = 25000000
	expmsg = "25 million"
else
	experience = 15000000
	expmsg = "15 million"
end
   removenugget = doPlayerRemoveItem(cid, 6527, 1)
	if removenugget == 1 then
		doPlayerAddExp(cid,experience)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have purchased " .. expmsg .. " experience points!  Thank you for donating!")
		doPlayerSendCancel(cid, "You do not have enough Coins.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end

I want edit function doPlayerAddExp to doPlayerAddManaSpent(cid, mana) , so player will get x mana spent when using coin.If someone know how to make it , please post it I've trying but i had debugs.

Thanks! I rep++ if you help me.
 
Last edited:
PHP:
function onSay(cid, words, param)
local lvl = getPlayerLevel(cid)
if lvl <= 100 then
	experience = 40000000
	expmsg = "40 million"
elseif lvl > 100 and lvl <= 200 then
	experience = 25000000
	expmsg = "25 million"
else
	experience = 15000000
	expmsg = "15 million"
end
   removenugget = doPlayerRemoveItem(cid, 6527, 1)
	if removenugget == 1 then
		doPlayerAddManaSpent(cid,experience)
		doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have purchased " .. expmsg .. " experience points!  Thank you for donating!")
		doPlayerSendCancel(cid, "You do not have enough Coins.")
		doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
 
missing an 'else' i think.

PHP:
else
doPlayerSendCancel(cid, "You do not have enough Coins.")
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return TRUE
end

or something like that d:
 
u are 1337 in ur dreams man... u come say "missing else or something like that" -.-
 
Last edited by a moderator:
are you kidding ?
so when use the script it will say:

PHP:
doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have purchased " .. expmsg .. " experience points!  Thank you for donating!")
		doPlayerSendCancel(cid, "You do not have enough Coins.")


at same time...
but with else...if the player don't have enough coins...
say:

PHP:
doPlayerSendCancel(cid, "You do not have enough Coins.")


--

PHP:
function onSay(cid, words, param)
local lvl = getPlayerLevel(cid)
if lvl <= 100 then
    experience = 40000000
    expmsg = "40 million"
elseif lvl > 100 and lvl <= 200 then
    experience = 25000000
    expmsg = "25 million"
else
    experience = 15000000
    expmsg = "15 million"
end
   removenugget = doPlayerRemoveItem(cid, 6527, 1)
    if removenugget == 1 then
        doPlayerAddManaSpent(cid,experience)
        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have purchased " .. expmsg .. " experience points!  Thank you for donating!")
else
        doPlayerSendCancel(cid, "You do not have enough Coins.")
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
return TRUE
end


understand now --'
like you can see, I am not 1337 scripter...
 
Code:
function onSay(cid, words, param)
if getPlayerStorageValue(cid, 34249) < 1
local lvl = getPlayerLevel(cid)
if lvl <= 100 then
    experience = 40000000
    expmsg = "40 million"
elseif lvl > 100 and lvl <= 200 then
    experience = 25000000
    expmsg = "25 million"
else
    experience = 15000000
    expmsg = "15 million"
end
   removenugget = doPlayerRemoveItem(cid, 6527, 1)
    if removenugget == 1 then
        doPlayerAddManaSpent(cid,experience)
        doPlayerSendTextMessage(cid,MESSAGE_INFO_DESCR, "You have purchased " .. expmsg .. " experience points!  Thank you for donating!")
setPlayerStorageValue(cid, 34249, getPlayerStorageValue(cid, 34249) + 1)
else
        doPlayerSendCancel(cid, "You do not have enough Coins.")
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
else
   doPlayerSendCancel(cid, "You can t do it again noob.")
        doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
 
mor it made my laugh because first colandus pwn him and then Zonet pwnd himxDXDXDXD

zonet pwned him??? he just said "doPlayerSendCancel" for NO reason LOL

it's like someone talk about airplanes and then Zonet come in saying "bro, airplanes"
 
Back
Top