<rune name="Manarune" id="2298" allowfaruse="1" charges="1" lvl="1" maglv="1" exhaustion="500" aggressive="0" needtarget="1" blocktype="solid" script="manarune.lua"/>
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_MAGIC_GREEN)
setCombatParam(combat, COMBAT_PARAM_TARGETCASTERORTOPMOST, 1)
setCombatParam(combat, COMBAT_PARAM_AGGRESSIVE, 0)
function onCastSpell(cid, var)
local mana = math.random(getPlayerLevel(cid) * 6 + getPlayerMagLevel(cid) * 8,getPlayerLevel(cid) * 6 + getPlayerMagLevel(cid) * 8)
local kolor = 35
doPlayerAddMana(cid, mana)
doSendAnimatedText(getPlayerPosition(cid),mana,kolor)
doCombat(cid, combat, var)
return true
end
<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"/>
</item>
function onSay(cid, words, param, channel)
if (getPlayerItemCount(cid, 2160) * 10000 + getPlayerItemCount(cid, 2152) * 100 + getPlayerItemCount(cid, 2148)) >= 10000 then
doPlayerSendTextMessage(cid,20,"Amulet of loss added to your inventory.")
doPlayerRemoveMoney(cid, 10000)
doPlayerAddItem(cid, 2173, 1)
else
doPlayerSendTextMessage(cid,20,"You don't have enough money.")
end
end
And when u are online and answer my questions how i get the !aol comand orange ? ^_^
function onSay(cid, words, param, channel)
local shop = {
["aol"] = {
id = 2173, count = 1, cost = 10000
},
["backpack"] = {
id = 1988, count = 1, cost = 100
}
}
local v = shop[param]
return getPlayerMoney(cid) > v.cost and doPlayerRemoveMoney(cid, v.cost) and doPlayerAddItem(cid, v.id, v.count) and doCreatureSay(cid, getItemInfo(v.id).name .. " added to inventory!", TALKTYPE_ORANGE_1) or doPlayerSendCancel(cid, "Sorry, but you do not have enough money.")
end
First
PHP:function onSay(cid, words, param, channel) if (getPlayerItemCount(cid, 2160) * 10000 + getPlayerItemCount(cid, 2152) * 100 + getPlayerItemCount(cid, 2148)) >= 10000 then doPlayerSendTextMessage(cid,20,"Amulet of loss added to your inventory.") doPlayerRemoveMoney(cid, 10000) doPlayerAddItem(cid, 2173, 1) else doPlayerSendTextMessage(cid,20,"You don't have enough money.") end end
thanks, u have help me verry mutch.
If i find problem can i wright here then ?
And btw i dont understand
look my chest i bugged they can open it and take item but next tahts come dont gets bequs the other player toke it..
I have action ID 2000 and a random nummer on unique ID
Its fuckt up and my frends say u maybe need to do a script to that quest but my other frends say u dont need to do a scritp
And i cant take item whit my god so i thinked its workt,
U know what to do ?
function onUse(cid, item, frompos, item2, topos)
if item.uid == 7410 then -- item id
queststatus = getPlayerStorageValue(cid,7409) --same as set player storagevalue
if queststatus == -1 then
doPlayerSendTextMessage(cid,25,"You have found a Glider Wand.") -- msg if done it
doPlayerAddItem(cid,7410,1) -- item id
setPlayerStorageValue(cid,7409,1)-- item id - one number
else
doPlayerSendTextMessage(cid,25,"It is empty.") -- msg if done the quest
end
else
return 0
end
return 1
end
<!-- RandomQ -->
<action uniqueid="****" script="blabla.lua" />
replace the aol.lua tih thatWhere to put this ? in config or is this orange ?