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

Help..Whats wrong in this scripts? [SCRIPTERS PLEASE JOIN]

Sir Shutter

Learning LUA
Joined
Nov 17, 2008
Messages
1,437
Reaction score
10
Location
Egypt
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]
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!
 
Lols... It's not working errors are in everything DoPlayerAddMana I dont know how there is an error in this scripts.. it should work fine i think so
 
Error in 1st script [Manarune]

[11/12/2008 13:00:36] Lua Script Error: [Action Interface]
[11/12/2008 13:00:36] data/actions/scripts/custom vets/manarune.lua:eek:nUse

[11/12/2008 13:00:36] data/actions/scripts/custom vets/manarune.lua:6: attempt to call global 'doCreatureAddMana' (a nil value)
[11/12/2008 13:00:36] stack traceback:
[11/12/2008 13:00:36] data/actions/scripts/custom vets/manarune.lua:6: in function <data/actions/scripts/custom vets/manarune.lua:1>

While error in second [WaterHeal]

[11/12/2008 13:04:39] Lua Script Error: [Action Interface]
[11/12/2008 13:04:39] data/actions/scripts/custom vets/waterheal.lua:eek:nUse

[11/12/2008 13:04:39] data/actions/scripts/custom vets/waterheal.lua:3: attempt to call global 'doPlayerSay' (a nil value)
[11/12/2008 13:04:39] stack traceback:
[11/12/2008 13:04:39] data/actions/scripts/custom vets/waterheal.lua:3: in function <data/actions/scripts/custom vets/waterheal.lua:1>

Just fix those for now.. :D
 
Alot of scripts needa be fixed.. Just needa those for now

Im using TFS 8.31 SQL, Its called "theforgottenserver-v0.2-win32gui-20-e******"

Thats it :p
 
Last edited by a moderator:
So guys? :D, any help now? hmmpf! Add me on msn : [email protected] :D

dont work pal i tryed both... -.- when i do it to creature says the same error but with creature when player also the same but with player

ohoh yeah ok it worked the manarune worked, but! how do i make it say a message like "Large ManaHeal!!" this thing dont work he dont send a text message

GREEATTTTTTTTT.. the manaruen script works now, other scripts please guys? :D waiting for reply.. FIRST REP FOR MARCINEK CONGRATZ AND THANKS!
 
Last edited by a moderator:
Back
Top