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

Lua script!

titokere

Member
Joined
May 31, 2014
Messages
38
Reaction score
7
Hi i have this script :

actions:
function onUse(cid, item)
local player = Player(cid)
local modal = ModalWindow (1901, "Character Mastery", "Available soulpoints: xx")

modal:addChoice(1, "Axe")
modal:addChoice(2, "Club")
modal:addChoice(3, "Sword")
modal:addChoice(4, "Lance")
modal:addChoice(5, "Blade")
modal:addChoice(6, "Magic")
modal:addChoice(7, "Shielding")
modal:addChoice(8, "Smith")
modal:addChoice(9, "Costurer")
modal:addChoice(10, "Enchanter")
modal:addChoice(11, "Cancel")

if modal:getId() == 1901 then

modal:addButton(1, "Upgrade")
modal:setDefaultEnterButton(1)

end
modal:sendToPlayer(player)
return true
end

creaturescript
function onModalWindow(cid, modalWindowId, buttonId, choiceId, item, position, pos, toPosition, fromPosition, itemEx)

if modalWindowId == 1901 and choiceId == 1 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your axe fighting!")
return true
end
if modalWindowId == 1901 and choiceId == 2 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your club fighting!")
return true
end
if modalWindowId == 1901 and choiceId == 3 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your sword fighting!")
return true
end
if modalWindowId == 1901 and choiceId == 4 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your lance fighting!")
return true
end
if modalWindowId == 1901 and choiceId == 5 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your blade fighting!")
return true
end
if modalWindowId == 1901 and choiceId == 6 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your magic level!")
return true
end
if modalWindowId == 1901 and choiceId == 7 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your shielding level!")
return true
end
if modalWindowId == 1901 and choiceId == 8 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your smith knowledge!")
return true
end
if modalWindowId == 1901 and choiceId == 9 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your costurer knowledge!")
return true
end
if modalWindowId == 1901 and choiceId == 10 then
doPlayerSendTextMessage(cid, 18, "You have upgraded your enchanter knowledge!")
return true
end
if modalWindowId == 1901 and choiceId == 11 then
doPlayerSendTextMessage(cid, 18, "You have cancel the upgrade!")
return true
end
end

211qrsm_th.png


i need the modalwindow show the Soulpoints S: and 1 soulpoint = 1 skill.. can help me???
 
Back
Top