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

change 0.2 on 0.3b2 problem with cash

Drakos

Banned User
Joined
May 27, 2008
Messages
218
Reaction score
1
Location
Poland
i cant buy nothing on NPC or by commands (like !Bless) it shows that i havent cash.

someone could help me ?
 
Perhaps you have to update your cash getting lines to newer ones:

Code:
local cost = cost of item
if(doPlayerRemoveMoney(cid, cost) == TRUE) then
doPlayerAddItem(cid, 2160, 1)
 
Code:
-- !bless by Piotrek1447
-- edited by Kleksu
local bless = {1, 2, 3, 4, 5}
local cost = 10000000 -- Cost in gp.
function onSay(cid, words, param)
	for i = 1, table.maxn(bless) do
		if(getPlayerBlessing(cid, bless[i])) then
			doPlayerSendCancel(cid, "You have already all blessings.")
			return TRUE
		end
	end
	if(doPlayerRemoveMoney(cid, cost) == TRUE) then
		for i = 1, table.maxn(bless) do
			doPlayerAddBlessing(cid, bless[i])
		end
		doPlayerSendTextMessage(cid,24, "You bought all blessing.")
		doSendMagicEffect(getPlayerPosition(cid), 28)
	else
		doPlayerSendCancel(cid, "You don't have enough money.")
	end
	return TRUE
end
 
here is my script:
Code:
-<function onSay(cid, words, param)
    if getPlayerBlessing(cid, 1) or getPlayerBlessing(cid, 2) or getPlayerBlessing(cid, 3) or getPlayerBlessing(cid, 4) or getPlayerBlessing(cid, 5) then
        doPlayerSendCancel(cid,'You have already got one or more blessings!')
    else
        if doPlayerRemoveMoney(cid, 70000) == TRUE then
            doPlayerAddBlessing(cid, 1)
            doPlayerAddBlessing(cid, 2)
            doPlayerAddBlessing(cid, 3)
            doPlayerAddBlessing(cid, 4)
            doPlayerAddBlessing(cid, 5)
			doSendMagicEffect(getPlayerPosition(cid), CONST_ME_HOLYDAMAGE)
            doPlayerSendTextMessage(cid,MESSAGE_EVENT_ADVANCE,'You have been blessed by the gods!')
        else
            doPlayerSendCancel(cid, "You need 70k to get blessed!")
        end
    end    
    return 1
end->

talkactions.xml
Code:
  <talkaction words="!bless" script="bless.lua" />

Thanks~
 
In data/items/items.xml, replace these lines:
PHP:
	<item id="2148" article="a" name="gold coin" plural="gold coins">
		<attribute key="weight" value="10"/>
	</item>
with this:
PHP:
	<item id="2148" article="a" name="gold coin" plural="gold coins">
		<attribute key="weight" value="10"/>
		<attribute key="worth" value="1"/>
	</item>





PHP:
	<item id="2152" article="a" name="platinum coin" plural="platinum coins">
		<attribute key="weight" value="10"/>
	</item>
with this:
PHP:
	<item id="2152" article="a" name="platinum coin" plural="platinum coins">
		<attribute key="weight" value="10"/>
		<attribute key="worth" value="100"/>
	</item>





PHP:
	<item id="2160" article="a" name="crystal coin" plural="crystal coins">
		<attribute key="weight" value="10"/>
	</item>
with this:
PHP:
	<item id="2160" article="a" name="crystal coin" plural="crystal coins">
		<attribute key="weight" value="10"/>
		<attribute key="worth" value="10000"/>
	</item>
 
Back
Top