Hello Otland!
I Create This Script For Server 8.7+, This Script Is For Use ItemID 1945 And ActionID And You Adquired A Mount
Now;
Here Are A Script
Actions.xml;
End Of Script,
Thanks For Watch
Credits;
Nightss/Nights
CyberM/Cbrm
I Create This Script For Server 8.7+, This Script Is For Use ItemID 1945 And ActionID And You Adquired A Mount
Now;
Here Are A Script
Code:
if not getMountInfo then
MOUNTS = {}
do
local o = io.open('data/XML/mounts.xml','r')
file = o:read('*a')
o:close()
end
for body in file:gmatch('<mounts>(.-)</mounts>') do
for line in body:gmatch('<mount(.-)/>') do
local temp = {}
for k, v in line:gmatch('(%w+)="(.-)"') do
temp[k] = v
end
table.insert(MOUNTS, temp)
end
end
getMountInfo = function(id)
for i, mount in pairs(MOUNTS) do
if id == i then
return mount
end
end
return MOUNTS
end
end
-------------------------------------------------------------
Mount Sistem V3 By CyberM And Nights
------------------------------------------------------------
local stat = 4347 -- Storage Base DONT TOUCH
local aid = { --actionid, mountid, storage DONT TOUCH
[5600] = {1, stat}, -- Widow Queen
[5601] = {2, stat+1}, -- Racing Bird
[5602] = {3, stat+2}, -- War Bear
[5603] = {4, stat+3}, -- Black Sheep
[5604] = {5, stat+4}, -- Midnight Panter
[5605] = {6, stat+5}, -- Draptor
[5606] = {7, stat+6}, -- Titanica
[5607] = {8, stat+7}, -- Tin Lizzard
}
function onUse(cid, item, fromPosition, itemEx, toPosition)
local aids = aid[item.actionid]
if aids then
if getPlayerStorageValue(cid, aids[2]) == -1 then
doPlayerAddMount(cid, aids[1])
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, 'Mount "..getMountInfo(aids[1]).name.." Received.')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_MAGIC_BLUE)
setPlayerStorageValue(cid, aids[2], 1)
return doTransformItem(item.uid, item.itemid == 1945 and 1946 or 1945)
else
doPlayerSendTextMessage(cid, MESSAGE_EVENT_DEFAULT, 'You Alredy Have A Mount "..getMountInfo(aids[1]).name.." .')
doSendMagicEffect(getPlayerPosition(cid), CONST_ME_POFF)
end
end
return true
end
Actions.xml;
Code:
<action actionid="5600-5607" event="script" value="name.lua"/>
End Of Script,
Thanks For Watch
Credits;
Nightss/Nights
CyberM/Cbrm
Last edited: