Sir Shutter
Learning LUA
Hello.. I am changing my server from 8.10 XML to 8.31 SQL.
Some people said its easy.. I dont agree with it since I got alot of scripts to change to type 8.31 and Im not a scripter :S
So I'l be putting all of them here, and if someone can help just post the script correctly with errors fixed and converted to 8.31
Thanks!
First Script :-
[Manarune]
Second Script :-
[WaterHeal Right click fountain get mana]
Third Script :-
[Golden Nuggets = 100Crystal Coin]
Fourth Script :-
[Golden Nuggets = 100Crystal Coin]
Fifth Script :-
[Pull the lever, get the item!]
There is more scripts kinda alot more.. But try to help in this "Main Scripts"
Note :- If you help me, In this scripts Il give Reps!
Another Note :- If you fixed a script for me you should type like First Script [FIX] :- then type the script here the fixed one so i can copy/paste in the script and it should work normally with TFS 8.31!
Thanks indeed,
Sir Shutter!
Some people said its easy.. I dont agree with it since I got alot of scripts to change to type 8.31 and Im not a scripter :S
So I'l be putting all of them here, and if someone can help just post the script correctly with errors fixed and converted to 8.31
Thanks!
First Script :-
[Manarune]
Code:
function onUse(cid, item, frompos, item2, topos)
mag = getPlayerMagLevel(cid)
if mag >= 3 then
doSendMagicEffect(topos,1)
doCreatureSay(cid,"Large ManaHeal!!",16)
doCreatureAddMana(cid, 6000)
if item.type > 1 then
doChangeTypeItem(item.uid,item.type-1)
else
doRemoveItem(item.uid,1)
end
else
doSendMagicEffect(frompos,2)
doPlayerSendCancel(cid,"You don't have the required magic level to use that rune.")
end
return 1
end
Second Script :-
[WaterHeal Right click fountain get mana]
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 5739 then
doPlayerSay(cid,"Ahhh..Mana..Ahhhhhhhhh",16)
doSendMagicEffect(getCreaturePosition(cid),14)
doPlayerAddMana(cid, 100000)
end
return TRUE
end
Third Script :-
[Golden Nuggets = 100Crystal Coin]
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2157 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2160,100)
doPlayerSendTextMessage(cid,22,"You have changed 1 golden nugget to 100 crystal coins")
end
end
Fourth Script :-
[Golden Nuggets = 100Crystal Coin]
Code:
function onUse(cid, item, frompos, item2, topos)
if item.itemid == 2160 and item.type == 100 then
doRemoveItem(item.uid,item.type)
doPlayerAddItem(cid,2157,1)
doPlayerSendTextMessage(cid,22,"You have changed 100 crystal to 1 golden nugget")
elseif item.itemid == 2160 and item.type < 100 then
doRemoveItem(item.uid,1)
doPlayerAddItem(cid,2152,100)
doPlayerSendTextMessage(cid,22,"You have changed 1 crystal to 100 plate coins")
end
end
Fifth Script :-
[Pull the lever, get the item!]
Code:
function onUse(cid, item, frompos, item2, topos)
if item.uid == 2268 and doPlayerRemoveMoney(cid, 1000) == 1 then
doPlayerAddItem(cid, item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2273 and doPlayerRemoveMoney(cid, 1000) == 1 then
doPlayerAddItem(cid, item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2298 and doPlayerRemoveMoney(cid, 10000) == 1 then
doPlayerAddItem(cid, item.uid, 100)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2304 and doPlayerRemoveMoney(cid, 500) == 1 then
doPlayerAddItem(cid, item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2306 and doPlayerRemoveMoney(cid, 1000000) == 1 then
doPlayerAddItem(cid, item.uid, 100)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2313 and doPlayerRemoveMoney(cid, 750) == 1 then
doPlayerAddItem(cid, item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2316 and doPlayerRemoveMoney(cid, 250000) == 1 then
doPlayerAddItem(cid, item.uid, 100)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2275 and doPlayerRemoveMoney(cid, 10000) == 1 then
doPlayerAddItem(cid, item.uid, 100)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2260 and doPlayerRemoveMoney(cid, 200) == 1 then
doPlayerAddItem(cid, item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2281 and doPlayerRemoveMoney(cid, 200) == 1 then
doPlayerAddItem(cid, item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2273 and doPlayerRemoveMoney(cid, 200) == 1 then
doPlayerAddItem(cid, item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2268 and doPlayerRemoveMoney(cid, 200) == 1 then
doPlayerAddItem(cid, item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
elseif item.uid == 2260 and doPlayerRemoveMoney(cid, 200) == 1 then
doPlayerAddItem(cid, item.uid, 1)
doSendMagicEffect(getCreaturePosition(cid),14)
else
doPlayerSendCancel(cid, "You don't have enough money.")
doSendMagicEffect(getCreaturePosition(cid), 2)
end
end
There is more scripts kinda alot more.. But try to help in this "Main Scripts"
Note :- If you help me, In this scripts Il give Reps!
Another Note :- If you fixed a script for me you should type like First Script [FIX] :- then type the script here the fixed one so i can copy/paste in the script and it should work normally with TFS 8.31!
Thanks indeed,
Sir Shutter!