Fortera Global
Intermediate OT User
- Joined
- Nov 20, 2015
- Messages
- 1,180
- Solutions
- 2
- Reaction score
- 117
tfs 1.2
Hello, I have this script:
creaturescripts
When the player chooses a mount that already has and clicks on confirm, gives this error on screen:
How to remove this error? thanks
Hello, I have this script:
creaturescripts
Lua:
local mounts = {
[1] = {name = "Sparkion", ID = 94},
}
function onModalWindow(player, modalWindowId, buttonId, choiceId)
player:unregisterEvent("VibrantEgg")
if modalWindowId == 1001 then
if buttonId == 100 then
if player:getItemCount(26194) == 0 then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You must have a Vibrant Egg in your backpack!")
return false
end
if choiceId == 0 then
return false
end
player:removeItem(26194, 1)
player:addMount(mounts[choiceId].ID)
player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
end
end
end
When the player chooses a mount that already has and clicks on confirm, gives this error on screen:
How to remove this error? thanks