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

[Requesting] Working Skill Scroll

Majeski20

New Member
Joined
Apr 21, 2008
Messages
602
Reaction score
4
Location
Sweden
Hello. I need a script to add skills to the players, etc for a quest you recieve an item , when u right-click on it you advance in Sword fighting. I have searched for a long time but didnt find anything working. <_<

Thanks in advance. :)
 
There is no need to do local for such script you wrote all of this local skillGain = 1 and so u don't write doPlayerAddSkill(cid, 2, "1") < This 1. :)

And the working script is:

Lua:
function onUse(cid, item, fromPosition)
doPlayerAddSkill(cid, axe, amount = 1) -- You can change axe to w/e
end
return true
end
 
There is no need to do local for such script you wrote all of this local skillGain = 1 and so u don't write doPlayerAddSkill(cid, 2, "1") < This 1. :)

And the working script is:

Lua:
function onUse(cid, item, fromPosition)
doPlayerAddSkill(cid, axe, amount = 1) -- You can change axe to w/e
end
return true
end


Error :eek:

Code:
[Error - LuaScriptInterface::loadFile] data/actions/scripts/swordscroll.lua:2: '
)' expected near '='
[Warning - Event::loadScript] Cannot load script (data/actions/scripts/swordscro
ll.lua)
data/actions/scripts/swordscroll.lua:2: ')' expected near '='
 
Lua:
function onUse(cid, item, fromPosition)
doPlayerAddSkill(cid, axe, 1) -- You can change axe to w/e
doRemoveItem(uid, 1) -- add to uid the uniqueid of the item. remove this from the script if u don't want the item to be removed.
end
return true
end

Or you can add this to a script

Lua:
doRemoveCreature(cid)
db.executeQuery("UPDATE `players` ADD `player_skills` = 8 WHERE `id` = "..getPlayerGUID(cid)..";")
 
Last edited:
Or you can add this to a script

Lua:
db.executeQuery("UPDATE `players` ADD `player_skills` = 8 WHERE `id` = "..getPlayerGUID(cid)..";")
Nope, it doesn't work when player is online, because server don't reload infomation from database.
 
Back
Top