1 [Sistema] Addon Doll en Modal Window (Tfs 1.1/1.2) Lun Jun 01, 2015 4:03 pm
[Admin] God Maya
Administrador
hola usuarios de tibiaface
hoy le traigo el addon doll en modal windows para tfs 1.1/1.2
instalacion:
en su login.lua registran esto:
añadimos esta tag:
luego nos vamos a:
copiamos cualquier archivo y renombramos por modalAD.lua y pegamos esto dentro
Ahora nos vamos a:
y añadimos esta tag:
luego nos vamos a:
copiamos cualquier archivo y renombramos por modalAD.lua y pegamos esto dentro:
creditos:
Regards,
Beastn.
hoy le traigo el addon doll en modal windows para tfs 1.1/1.2
instalacion:
en su login.lua registran esto:
- Código:
'modalAD',
data/creaturescripts/creaturescripts.xml |
- Código:
<event type="modalwindow" name="modalAD" script="modalAD.lua"/>
luego nos vamos a:
/data/creaturescripts/scripts |
- Código:
function onModalWindow(player, modalWindowId, buttonId, choiceId)
player:unregisterEvent("modalad")
local maleOutfits = {128, 129, 130, 131, 132, 133, 134, 147, 148, 149, 150, 151, 152, 153, 154, 251, 268, 273, 278, 289, 325, 328, 335, 367, 430, 432, 463, 465, 472, 512, 516, 541, 574, 577, 610, 619, 633, 634, 637, 664, 667, 684, 695, 697, 699}
local femaleOutfits = {136, 137, 141, 139, 140, 138, 142, 143, 144, 145, 146, 155, 156, 157, 158, 252, 269, 270, 279, 288, 324, 329, 336, 431, 433, 464, 466, 471, 513, 514, 542, 575, 578, 618, 620, 632, 578, 636, 665, 578, 683, 694, 696, 698}
if modalWindowId == 1000 then
if buttonId == 100 then
if player:hasOutfit(femaleOutfits[choiceId], 3) or player:hasOutfit(maleOutfits[choiceId], 3) then
player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You already have these addons.')
return false
end
player:addOutfitAddon(maleOutfits[choiceId], 3)
player:addOutfitAddon(femaleOutfits[choiceId], 3)
player:removeItem(8982, 1)
player:getPosition():sendMagicEffect(CONST_ME_FIREWORK_YELLOW)
end
end
end
Ahora nos vamos a:
data/actions/actions.xml |
- Código:
<action itemid="8982" script="modalAD.lua"/>
luego nos vamos a:
data/actions/scripts |
- Código:
function onUse(player, item, fromPosition, itemEx, toPosition, isHotkey)
player:registerEvent("ModalAD")
local title = "Choose your outfit!"
local message = "You will receive the outfit and both addons!"
local window = ModalWindow(1000, title, message)
window:addButton(100, "Confirm")
window:addButton(101, "Cancel")
window:addChoice(1, "Citizen")
window:addChoice(2, "Hunter")
window:addChoice(3, "Mage")
window:addChoice(4, "Knight")
window:addChoice(5, "Noble")
window:addChoice(6, "Summoner")
window:addChoice(7, "Warrior")
window:addChoice(8, "Barbarian")
window:addChoice(9, "Druid")
window:addChoice(10, "Wizard")
window:addChoice(11, "Oriental")
window:addChoice(12, "Pirate")
window:addChoice(13, "Assassin")
window:addChoice(14, "Beggar")
window:addChoice(15, "Shaman")
window:addChoice(16, "Norse")
window:addChoice(17, "Nightmare")
window:addChoice(18, "Jester")
window:addChoice(19, "Brotherhood")
window:addChoice(20, "Demon Hunter")
window:addChoice(21, "Yalaharian")
window:addChoice(22, "Wedding")
window:addChoice(23, "Warmaster")
window:addChoice(24, "Wayfarer")
window:addChoice(25, "Afflicted")
window:addChoice(26, "Elementalist")
window:addChoice(27, "Deepling")
window:addChoice(28, "Insectoid")
window:addChoice(29, "Entrepreneur")
window:addChoice(30, "Crystal Warlord")
window:addChoice(31, "Soil Guardian")
window:addChoice(32, "Demon")
window:addChoice(33, "Cave Explorer")
window:addChoice(34, "Dream Warden")
window:addChoice(35, "Glooth Engineer")
window:addChoice(36, "Jersey")
window:addChoice(37, "Champion")
window:addChoice(38, "Conjurer")
window:addChoice(39, "Beast Master")
window:addChoice(40, "Chaos Acolyte")
window:addChoice(41, "Death Herald")
window:addChoice(42, "Ranger")
window:addChoice(43, "Ceremonial")
window:addChoice(44, "Puppeteer")
window:addChoice(45, "Spirit Caller")
window:setDefaultEnterButton(100)
window:setDefaultEscapeButton(101)
window:sendToPlayer(player)
return true
end
creditos:
Regards,
Beastn.