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

When my player use aol they lose their bp with aol anyhelp? READ V

kuk124

Banned User
Joined
May 6, 2010
Messages
271
Reaction score
6
Location
Homeless.
They useing aol and when they hunting and dieing they lose the bp with aol , i meant aol is not in bp if you know wwhat i mean, When they buy bless , They dont lose bp , or aol ?? What is the problem with aol they lose bp and aol ?? Anyhelp ?

Ill Rep you if it helped

Here is my lua , And item xlm



<item id="2173" article="an" name="amulet of loss">
<attribute key="weight" value="420" />
<attribute key="slotType" value="necklace" />
<attribute key="preventDrop" value="1" />


PHP:




function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) == TRUE then
doPlayerAddItem(cid, 2173, 1)
doSendMagicEffect(getPlayerPosition(cid), 14)
doSendAnimatedText(getCreaturePosition(cid), '*aol*', TEXTCOLOR_GREEN)
else
doPlayerSendCancel(cid, 'Remeber Buy Bless and aol all time.')
doSendMagicEffect(getPlayerPosition(cid), 2)
return TRUE
end
return TRUE
end
 
Och det köpa aol scriptet ser lite fel ut testa detta:
Lua:
function onSay(cid, words, param)
	if doPlayerRemoveMoney(cid,15000) == TRUE then
		doPlayerAddItem(cid,2173,1)
		doSendMagicEffect(getPlayerPosition(cid),12)
		doPlayerSendTextMessage(cid,22,"You've bought an Amulet of Loss!")
else
		doPlayerSendMagicEffect(getPlayerPosition(cid),2)
		doPlayerSendCancel(cid, "You don't have enough money to buy an Amulet of loss")
	end
return TRUE
end

Still same
 
Code:
<item id="2173" article="an" name="amulet of loss">
    <attribute key="weight" value="420" />
    <attribute key="slotType" value="necklace" />
    <attribute key="charges" value="1" />
    <attribute key="preventDrop" value="1" />

Lua:
function onSay(cid, words, param)
	if getPlayerMoney(cid) >= 10000 then
             doPlayerRemoveMoney(cid,10000)
		doPlayerAddItem(cid,2173,1)
		doPlayerSendTextMessage(cid,22,"You've bought an Amulet of Loss!")
                 doSendAnimatedText(getCreaturePosition(cid), "AOL!", TEXTCOLOR_DARKYELLOW)
else
		doPlayerSendCancel(cid, "You don't have enough money to buy an Amulet of loss")
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
	end
return TRUE
end
 
Last edited:
Code:
<item id="2173" article="an" name="amulet of loss">
    <attribute key="weight" value="420" />
    <attribute key="slotType" value="necklace" />
    <attribute key="charges" value="1" />
    <attribute key="preventDrop" value="1" />

Lua:
function onSay(cid, words, param)
	if getPlayerMoney(cid) > 10000
             doPlayerRemoveMoney(cid,10000)
		doPlayerAddItem(cid,2173,1)
		doPlayerSendTextMessage(cid,22,"You've bought an Amulet of Loss!")
else
		doPlayerSendCancel(cid, "You don't have enough money to buy an Amulet of loss")
	end
return TRUE
end



Lol It doe'snt work say !aol
 
I made a small mistake now fixed.

If it didn't work try

Lua:
function onSay(cid, words, param)
if doPlayerRemoveMoney(cid, 10000) == TRUE then
    doPlayerAddItem(cid, 2173, 1)
    doSendAnimatedText(getCreaturePosition(cid), "AOL!", TEXTCOLOR_DARKYELLOW)
    doPlayerSendTextMessage(cid,22,"Thanks for buying!.")
else
    doPlayerSendCancel(cid,"You need 10,000 gold coins.")
	doSendMagicEffect(getCreaturePosition(cid), CONST_ME_POFF)
end
return TRUE
end
 
add in creaturescripts.xml

Code:
<event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>

in creaturescripts/scripts/login.lua add

Code:
registerCreatureEvent(cid, "onPrepareDeath")

in creaturescripts/scripts/preparedeath.lua

Lua:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	if(getPlayerSlotItem(cid, 2).itemid == 2173) and getPlayerSkullType(cid) < 3 then
		doCreatureSetDropLoot(cid, false)
	end
return true
end
 
add in creaturescripts.xml

Code:
<event type="preparedeath" name="onPrepareDeath" event="script" value="preparedeath.lua"/>

in creaturescripts/scripts/login.lua add

Code:
registerCreatureEvent(cid, "onPrepareDeath")

in creaturescripts/scripts/preparedeath.lua

Lua:
function onPrepareDeath(cid, lastHitKiller, mostDamageKiller)
	if(getPlayerSlotItem(cid, 2).itemid == 2173) and getPlayerSkullType(cid) < 3 then
		doCreatureSetDropLoot(cid, false)
	end
return true
end

It came error cannot creatre creture event script , when i started server ..-.-
 
Back
Top