Spike Tasks Quest

Discussion in 'Actions, MoveEvents & TalkActions' started by cbrm, Aug 1, 2016.

  1. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Spike Tasks Quest
    Help the Gnomes to fight their enemies around The Spike!
    Originally scripted on TFS 1.2, 10.77. Also tested on 10.95
    http://tibia.wikia.com/wiki/Spike_Tasks_Quest/Spoiler


    [​IMG] [​IMG]

    Initial Setup
    You need to have common sense, patience and at least an average ot knowledge to install this quest on your real-map server, so you can know why an error occurs while you do it. This has been thoroughly tested to avoid bugs and errors, and written efficiently with Sublime Text 3. I'm open to discussion and suggestions for code improvement and storyline similarity.

    Add @data/lib/core/constants.lua
    Code (Text):
    1.  
    2. SPIKE_FAME_POINTS = 27890
    3.  
    4. SPIKE_UPPER_PACIFIER_MAIN = 27891
    5. SPIKE_UPPER_PACIFIER_DAILY = 27892
    6. SPIKE_UPPER_MOUND_MAIN = 27893
    7. SPIKE_UPPER_MOUND_DAILY = 27894
    8. SPIKE_UPPER_TRACK_MAIN = 27895
    9. SPIKE_UPPER_TRACK_DAILY = 27896
    10. SPIKE_UPPER_KILL_MAIN = 27897
    11. SPIKE_UPPER_KILL_DAILY = 27898
    12.  
    13. SPIKE_MIDDLE_CHARGE_MAIN = 27899
    14. SPIKE_MIDDLE_CHARGE_DAILY = 27900
    15. SPIKE_MIDDLE_MUSHROOM_MAIN = 27901
    16. SPIKE_MIDDLE_MUSHROOM_DAILY = 27902
    17. SPIKE_MIDDLE_NEST_MAIN = 27903
    18. SPIKE_MIDDLE_NEST_DAILY = 27904
    19. SPIKE_MIDDLE_KILL_MAIN = 27905
    20. SPIKE_MIDDLE_KILL_DAILY = 27906
    21.  
    22. SPIKE_LOWER_PARCEL_MAIN = 27907
    23. SPIKE_LOWER_PARCEL_DAILY = 27908
    24. SPIKE_LOWER_UNDERCOVER_MAIN = 27909
    25. SPIKE_LOWER_UNDERCOVER_DAILY = 27910
    26. SPIKE_LOWER_LAVA_MAIN = 27911
    27. SPIKE_LOWER_LAVA_DAILY = 27912
    28. SPIKE_LOWER_KILL_MAIN = 27913
    29. SPIKE_LOWER_KILL_DAILY = 27914
    30.  
    [​IMG]Make sure these storage keys are not in use in your server, otherwise feel free to replace these ones with others that you don't use.
    Add @data/lib/core/player.lua
    Code (Text):
    1.  
    2. function Player.setExhaustion(self, value, time)
    3.     return self:setStorageValue(value, time + os.time())
    4. end
    5.  
    6. function Player.getExhaustion(self, value)
    7.     local storage = self:getStorageValue(value)
    8.     if storage <= 0 then
    9.         return 0
    10.     end
    11.     return storage - os.time()
    12. end
    13.  
    14. function Player.addFamePoint(self)
    15.     local points = self:getStorageValue(SPIKE_FAME_POINTS)
    16.     local current = math.max(0, points)
    17.     self:setStorageValue(SPIKE_FAME_POINTS, current + 1)
    18.     self:sendTextMessage(MESSAGE_STATUS_CONSOLE_BLUE, "You have received a fame point.")
    19. end
    20.  
    21. function Player.getFamePoints(self)
    22.     local points = self:getStorageValue(SPIKE_FAME_POINTS)
    23.     return math.max(0, points)
    24. end
    25.  
    26. function Player.removeFamePoints(self, amount)
    27.     local points = self:getStorageValue(SPIKE_FAME_POINTS)
    28.     local current = math.max(0, points)
    29.     self:setStorageValue(SPIKE_FAME_POINTS, current - amount)
    30. end
    31.  
    Add @data/lib/core/position.lua
    Code (Text):
    1.  
    2. function Position:compare(position)
    3.     return self.x == position.x and self.y == position.y and self.z == position.z
    4. end
    5.  
    6. function Position:isInRange(fromPosition, toPosition)
    7.     return (self.x >= fromPosition.x and self.y >= fromPosition.y and self.z >= fromPosition.z
    8.         and self.x <= toPosition.x and self.y <= toPosition.y and self.z <= toPosition.z)
    9. end
    10.  
    11. function Position:isWalkable()
    12.     local tile = Tile(self)
    13.     if not tile then
    14.           return false
    15.     end
    16.  
    17.     local ground = tile:getGround()
    18.     if not ground or ground:hasProperty(CONST_PROP_BLOCKSOLID) then
    19.         return false
    20.     end
    21.  
    22.     local items = tile:getItems()
    23.     for i = 1, tile:getItemCount() do
    24.         local item = items[i]
    25.         local itemType = item:getType()
    26.         if itemType:getType() ~= ITEM_TYPE_MAGICFIELD and not itemType:isMovable() and item:hasProperty(CONST_PROP_BLOCKSOLID) then
    27.             return false
    28.         end
    29.     end
    30.     return true
    31. end
    32.  
    33. function getFreePosition(from, to)
    34.     local result, tries = Position(from.x, from.y, from.z), 0
    35.     repeat
    36.         local x, y, z = math.random(from.x, to.x), math.random(from.y, to.y), math.random(from.z, to.z)
    37.         result = Position(x, y, z)
    38.         tries = tries + 1
    39.         if tries >= 20 then
    40.             return result
    41.         end                                            
    42.     until result:isWalkable()
    43.     return result
    44. end
    45.  
    46. function getFreeSand()
    47.     local from, to = ghost_detector_area.from, ghost_detector_area.to
    48.     local result, tries = Position(from.x, from.y, from.z), 0
    49.     repeat
    50.         local x, y, z = math.random(from.x, to.x), math.random(from.y, to.y), math.random(from.z, to.z)
    51.         result = Position(x, y, z)
    52.         tries = tries + 1
    53.         if tries >= 50 then
    54.             return result
    55.         end                                            
    56.     until result:isWalkable() and Tile(result):getGround():getName() == "grey sand"
    57.     return result
    58. end
    59.  
    Add @data/lib/core/string.lua
    Code (Text):
    1.  
    2. string.diff = function(diff)
    3.     local format = {
    4.         {'day', diff / 60 / 60 / 24},
    5.         {'hour', diff / 60 / 60 % 24},
    6.         {'minute', diff / 60 % 60},
    7.         {'second', diff % 60}
    8.     }
    9.  
    10.     local out = {}
    11.     for k, t in ipairs(format) do
    12.         local v = math.floor(t[2])
    13.         if(v > 0) then
    14.             table.insert(out, (k < #format and (#out > 0 and ', ' or '') or ' and ') .. v .. ' ' .. t[1] .. (v ~= 1 and 's' or ''))
    15.         end
    16.     end
    17.     local ret = table.concat(out)
    18.     if ret:len() < 16 and ret:find('second') then
    19.         local a, b = ret:find(' and ')
    20.         ret = ret:sub(b+1)
    21.     end
    22.     return ret
    23. end
    24.  
    Create folder data/actions/scripts/spike tasks

    Add @data/actions/actions.xml
    Code (Text):
    1.  
    2. <!-- Spike Tasks Quest -->
    3. <action itemid="21553" script="spike tasks/spirit shovel.lua"/>
    4. <action itemid="21554" script="spike tasks/tuning fork.lua"/>
    5. <action itemid="21555" script="spike tasks/ghost detector.lua"/>
    6. <action itemid="21556" script="spike tasks/thermometer.lua"/>
    7. <action itemid="21557" script="spike tasks/lodestone.lua"/>
    8. <action itemid="21559" script="spike tasks/nests.lua"/>
    9. <action itemid="21564" script="spike tasks/fertilizer.lua"/>
    10. <action itemid="21566" script="spike tasks/lodestone.lua"/>
    11. <action itemid="21568" script="spike tasks/lodestone.lua"/>
    12.  
    Create folder data/creaturescripts/scripts/spike tasks

    Add @data/creaturescripts/creaturescripts.xml
    Code (Text):
    1.  
    2. <!-- Spike Tasks Quest -->
    3. <event type="kill" name="UpperSpikeKill" script="spike tasks/upperspikekill.lua"/>
    4. <event type="kill" name="MiddleSpikeKill" script="spike tasks/middlespikekill.lua"/>
    5. <event type="kill" name="LowerSpikeKill" script="spike tasks/lowerspikekill.lua"/>
    6.  
    Register @data/creaturescripts/scripts/login.lua
    Code (Text):
    1.  
    2. player:registerEvent("UpperSpikeKill")
    3. player:registerEvent("MiddleSpikeKill")
    4. player:registerEvent("LowerSpikeKill")
    5.  
    Add @data/items/items.xml
    Code (Text):
    1.  
    2. <item id="21559" article="a" name="monster nest" />
    3. <item id="21560" article="a" name="destroyed monster nest">
    4.         <attribute key="decayTo" value="21559" />
    5.         <attribute key="duration" value="120" />
    6. </item>
    7. <item id="21561" article="an" name="ominous mound" />
    8. <item id="21562" article="an" name="opened ominous mound">
    9.         <attribute key="decayTo" value="21561" />
    10.         <attribute key="duration" value="120" />
    11. </item>
    12. <item id="21564" article="a" name="flask of mushroom fertilizer">
    13.         <attribute key="weight" value="180" />
    14.         <attribute key="description" value="It holds a liquid concentrate developed by the gnomes to fertilise mushrooms." />
    15. </item>    
    16. <item id="21565" article="a" name="gardener mushroom"/>
    17. <item id="21566" article="a" name="partically charged lodestone">
    18.         <attribute key="weight" value="300" />
    19. </item>    
    20. <item id="21567" article="a" name="magnetic monolith"/>
    21. <item id="21568" article="a" name="highly charged lodestone">
    22.         <attribute key="weight" value="300" />
    23. </item>            
    24. <item id="21713" article="a" name="chargeless monolith">
    25.         <attribute key="decayTo" value="21567" />
    26.         <attribute key="duration" value="120" />
    27. </item>
    28.  
    [​IMG]Replace the old items if you have any of these already.

    Create @data/npc/Gnommander.xml
    Code (Text):
    1.  
    2. <?xml version="1.0" encoding="UTF-8"?>
    3. <npc name="Gnommander" script="Gnommander.lua" walkinterval="2000" floorchange="0">
    4.       <health now="100" max="100" />
    5.       <look type="493" head="59" body="57" legs="39" feet="38" addons="0" />
    6.       <parameters>
    7.           <parameter key="message_greet" value="Hi there! Welcome to the spike." />
    8.     </parameters>    
    9. </npc>
    10.  
    Create @data/npc/Gnomux.xml
    Code (Text):
    1.  
    2. <?xml version="1.0" encoding="UTF-8"?>
    3. <npc name="Gnomux" script="Gnomux.lua" walkinterval="2000" floorchange="0">
    4.       <health now="100" max="100" />
    5.       <look type="493" head="12" body="82" legs="39" feet="114" addons="0" />
    6.     <parameters>
    7.         <parameter key="message_greet" value="Hi!" />
    8.     </parameters>
    9. </npc>
    10.  
    Create @data/npc/scripts/Gnommander.lua
    Code (Text):
    1.  
    2. local keywordHandler = KeywordHandler:new()
    3. local npcHandler = NpcHandler:new(keywordHandler)
    4. NpcSystem.parseParameters(npcHandler)
    5. local talkState = {}
    6. local speech = {
    7.     "I'm the operating commander of the Spike, the latest great accomplishment of the gnomish race.",
    8.     "The Spike is a crystal structure, created by our greatest crystal experts. It has grown from a crystal the size of my fist to the structure you see here and now.",
    9.     "Of course this did not happen from one day to the other. It's the fruit of the work of several gnomish generations. Its purpose has changed in the course of time.",
    10.     "At first it was conceived as a fast growing resource node. Then it was planned to become the prototype of a new type of high security base.",
    11.     "Now it has become a military base and a weapon. With our foes occupied elsewhere, we can prepare our strike into the depths of the earth.",
    12.     "This crystal can withstand extreme pressure and temperature, and it's growing deeper and deeper even as we speak.",
    13.     "The times of the fastest growth have come to an end, however, and we have to slow down in order not to risk the structural integrity of the Spike. But we are on our way and have to do everything possible to defend the Spike."
    14. }
    15.  
    16. function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
    17. function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
    18. function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)    end
    19. function onThink()                            npcHandler:onThink()                        end
    20.  
    21. function creatureSayCallback(cid, type, msg)
    22.     if not npcHandler:isFocused(cid) then
    23.         return false
    24.     end
    25.     local player = Player(cid)
    26.  
    27.     if msgcontains(msg, 'commander') then
    28.         return npcHandler:say('I\'m responsible for the security and reward heroes to our cause. If you are looking for missions, talk to Gnomilly, Gnombold and Gnomagery.', cid)
    29.     end
    30.  
    31.     if msgcontains(msg, 'reward') then
    32.         return npcHandler:say('I can sell special outfit parts. If your fame is high enough, you might be {worthy} of such a reward.', cid)
    33.     end
    34.  
    35.     if msgcontains(msg, 'spike') then
    36.         return npcHandler:say(speech, cid)
    37.     end
    38.  
    39.     if msgcontains(msg, 'worthy') then
    40.         if player:getFamePoints() < 100 then
    41.             return npcHandler:say('You are not worthy of a special reward yet.', cid)
    42.         end
    43.  
    44.         talkState[cid] = 'worthy'
    45.         return npcHandler:say('You can acquire the {basic} outfit for 1000 Gold, the {first} addon for 2000 gold and the {second} addon for 3000 gold. Which do you want to buy?', cid)
    46.     end
    47.  
    48.     if talkState[cid] == 'worthy' then
    49.         if msgcontains(msg, 'basic') then
    50.             if getPlayerLevel(cid) < 25 then
    51.                 talkState[cid] = nil
    52.                 return npcHandler:say('You do not have enough level yet.', cid)
    53.             end
    54.        
    55.             if player:hasOutfit(player:getSex() == 0 and 575 or 574) then
    56.                 talkState[cid] = nil
    57.                 return npcHandler:say('You already have that outfit.', cid)
    58.             end
    59.  
    60.             talkState[cid] = 'basic'
    61.             return npcHandler:say('Do you want to buy the basic outfit for 1000 Gold?', cid)
    62.         elseif msgcontains(msg, 'first') then
    63.             if getPlayerLevel(cid) < 50 then
    64.                 talkState[cid] = nil
    65.                 return npcHandler:say('You do not have enough level yet.', cid)
    66.             end
    67.        
    68.             if not player:hasOutfit(player:getSex() == 0 and 575 or 574) then
    69.                 talkState[cid] = nil
    70.                 return npcHandler:say('You do not have the Cave Explorer outfit.', cid)
    71.             end
    72.  
    73.             if player:hasOutfit(player:getSex() == 0 and 575 or 574, 1) then
    74.                 talkState[cid] = nil
    75.                 return npcHandler:say('You already have that addon.', cid)
    76.             end
    77.  
    78.             talkState[cid] = 'first'
    79.             return npcHandler:say('Do you want to buy the first addon for 2000 Gold?', cid)
    80.         elseif msgcontains(msg, 'second') then
    81.             if getPlayerLevel(cid) < 80 then
    82.                 talkState[cid] = nil
    83.                 return npcHandler:say('You do not have enough level yet.', cid)
    84.             end
    85.        
    86.             if not player:hasOutfit(player:getSex() == 0 and 575 or 574) then
    87.                 talkState[cid] = nil
    88.                 return npcHandler:say('You do not have the Cave Explorer outfit.', cid)
    89.             end
    90.  
    91.             if player:hasOutfit(player:getSex() == 0 and 575 or 574, 2) then
    92.                 talkState[cid] = nil
    93.                 return npcHandler:say('You already have that addon.', cid)
    94.             end
    95.  
    96.             talkState[cid] = 'second'
    97.             return npcHandler:say('Do you want to buy the second addon for 3000 Gold?', cid)
    98.         end
    99.     end
    100.  
    101.     if talkState[cid] == 'basic' then
    102.         if msgcontains(msg, 'yes') then
    103.             if not player:removeMoney(1000) then
    104.                 talkState[cid] = nil
    105.                 return npcHandler:say('You do not have that money.', cid)
    106.             end
    107.         end
    108.         player:removeFamePoints(100)
    109.         player:addOutfit(player:getSex() == 0 and 575 or 574)
    110.         talkState[cid] = nil
    111.         return npcHandler:say('Here it is.', cid)
    112.     elseif talkState[cid] == 'first' then
    113.         if msgcontains(msg, 'yes') then
    114.             if not player:removeMoney(2000) then
    115.                 talkState[cid] = nil
    116.                 return npcHandler:say('You do not have that money.', cid)
    117.             end
    118.         end
    119.         player:removeFamePoints(100)
    120.         player:addOutfitAddon(player:getSex() == 0 and 575 or 574, 1)
    121.         talkState[cid] = nil
    122.         return npcHandler:say('Here it is.', cid)
    123.     elseif talkState[cid] == 'second' then
    124.         if msgcontains(msg, 'yes') then
    125.             if not player:removeMoney(3000) then
    126.                 talkState[cid] = nil
    127.                 return npcHandler:say('You do not have that money.', cid)
    128.             end
    129.         end
    130.         player:removeFamePoints(100)
    131.         player:addOutfitAddon(player:getSex() == 0 and 575 or 574, 2)
    132.         talkState[cid] = nil
    133.         return npcHandler:say('Here it is.', cid)    
    134.     end
    135.     return true
    136. end
    137.  
    138. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    139. npcHandler:addModule(FocusModule:new())
    140.  
    Create @data/npc/scripts/Gnomux.lua
    Code (Text):
    1.  
    2. local keywordHandler = KeywordHandler:new()
    3. local npcHandler = NpcHandler:new(keywordHandler)
    4. NpcSystem.parseParameters(npcHandler)
    5. local talkState = {}
    6.  
    7. local spike_items = {
    8.     [21564] = {250, 4, SPIKE_MIDDLE_MUSHROOM_MAIN},
    9.     [21555] = {150, 3, SPIKE_UPPER_TRACK_MAIN},
    10.     [21569] = {100, 4, SPIKE_LOWER_PARCEL_MAIN},
    11.     [21557] = {250, 1, SPIKE_MIDDLE_CHARGE_MAIN},
    12.     [21553] = {150, 4, SPIKE_UPPER_MOUND_MAIN},
    13.     [21556] = {500, 1, SPIKE_LOWER_LAVA_MAIN},
    14.     [21554] = {150, 7, SPIKE_UPPER_PACIFIER_MAIN}
    15. }
    16.  
    17. local onBuy = function(cid, item, subType, amount, ignoreCap, inBackpacks)
    18.     if not doPlayerRemoveMoney(cid, spike_items[item][1]*amount) then
    19.         selfSay("You don't have enough money.", cid)
    20.     else
    21.         doPlayerAddItem(cid, item, amount)
    22.         selfSay("Here you are!", cid)
    23.     end
    24.     return true
    25. end
    26.  
    27. function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
    28. function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
    29. function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)    end
    30. function onThink()                            npcHandler:onThink()                        end
    31.  
    32. function creatureSayCallback(cid, type, msg)
    33.  
    34.     if not npcHandler:isFocused(cid) then
    35.         return false
    36.     end
    37.  
    38.     local player, canBuy, shopWindow = Player(cid), false, {}
    39.     for itemid, data in pairs(spike_items) do
    40.         if not isInArray({-1, data[2]}, player:getStorageValue(data[3])) then
    41.             canBuy = true
    42.             table.insert(shopWindow, {id = itemid, subType = 0, buy = data[1], sell = 0, name = ItemType(itemid):getName()})
    43.         end
    44.     end
    45.  
    46.     if msgcontains(msg, 'trade') then
    47.         if canBuy then
    48.             openShopWindow(cid, shopWindow, onBuy, onSell)
    49.             return npcHandler:say("Here you are.", cid)
    50.         else
    51.             return npcHandler:say("Sorry, there's nothing for you right now.", cid)
    52.         end
    53.         return true
    54.     end
    55.  
    56.     if msgcontains(msg, 'job') then
    57.         npcHandler:say("I'm responsible for resupplying foolish adventurers with equipment that they may have lost. If you're one of them, just ask me about a {trade}. ", cid)
    58.     end
    59.  
    60.     if msgcontains(msg, 'gnome') then
    61.         npcHandler:say("What could I say about gnomes that anyone would not know? I mean, we're interesting if not fascinating, after all.", cid)
    62.     end
    63.  
    64.     if msgcontains(msg, 'spike') then
    65.         npcHandler:say({"I came here as a crystal farmer and know the Spike all the way back to when it was a little baby crystal. I admit I feel a little fatherly pride in how big and healthy it has become.","When most other crystal experts left for new assignments, I decided to stay and help here a bit."}, cid)
    66.     end
    67.     return true
    68. end
    69.  
    70. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    71. npcHandler:addModule(FocusModule:new())
    72.  
    Map positions for NPCs
    Create magic forcefield with actionid 1000 @32242, 32611, 11
     
    janes123, sparcky, EnzzoCaaue and 3 others like this.
  2. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Upper Spike Tasks

    Create @data/actions/scripts/spike tasks/tuning fork.lua
    Code (Lua):
    1. function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    2.     if isInArray({-1, 7}, player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN)) then
    3.         return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    4.     end
    5.  
    6.     if (target == nil) or not target:isItem() or (target:getId() ~= 21558) then
    7.         return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    8.     end
    9.  
    10.     local sum = player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) + 1
    11.     player:setStorageValue(SPIKE_UPPER_PACIFIER_MAIN, sum)
    12.  
    13.     if sum == 7 then
    14.         item:remove()
    15.         player:sendTextMessage(MESSAGE_INFO_DESCR, "Report the task to Gnomilly.")
    16.     end
    17.  
    18.     target:transform(21563)
    19.     target:decay()
    20.     toPosition:sendMagicEffect(24)
    21.     return true
    22. end
    Add @data/monsters/monsters.xml
    Code (Lua):
    1. <monster name="Enraged Soul" file="ghosts/enraged soul.xml"/>
    Create @data/monsters/ghosts/enraged soul.lua
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <monster name="Enraged Soul" nameDescription="an enraged soul" race="undead" experience="120" speed="150">
    3.     <health now="150" max="150"/>
    4.     <look type="568" corpse="21368"/>
    5.     <targetchange interval="4000" chance="0"/>
    6.     <flags>
    7.         <flag summonable="0"/>
    8.         <flag attackable="1"/>
    9.         <flag hostile="1"/>
    10.         <flag illusionable="1"/>
    11.         <flag convinceable="0"/>
    12.         <flag pushable="0"/>
    13.         <flag canpushitems="1"/>
    14.         <flag canpushcreatures="0"/>
    15.         <flag targetdistance="1"/>
    16.         <flag staticattack="90"/>
    17.         <flag runonhealth="0"/>
    18.     </flags>
    19.     <attacks>
    20.         <attack name="melee" interval="2000" skill="40" attack="50"/>
    21.         <attack name="lifedrain" interval="2000" chance="15" range="1" min="-30" max="-55">
    22.             <attribute key="areaEffect" value="redshimmer"/>
    23.         </attack>
    24.     </attacks>
    25.     <immunities>
    26.         <immunity physical="1"/>
    27.         <immunity drown="1"/>
    28.         <immunity earth="1"/>
    29.         <immunity death="1"/>
    30.         <immunity lifedrain="1"/>
    31.         <immunity paralyze="1"/>
    32.     </immunities>
    33.     <voices interval="5000" chance="10">
    34.         <voice sentence="Huh!"/>
    35.         <voice sentence="Shhhhhh"/>
    36.         <voice sentence="Buuuuuh"/>
    37.     </voices>
    38.     <loot>
    39.         <item id="2404" chance="7002"/><!-- combat knife -->
    40.         <item id="2654" chance="8800"/><!-- cape -->
    41.         <item id="5909" chance="1940"/><!-- white piece of cloth -->
    42.     </loot>
    43. </monster>
    Create @data/actions/scripts/spike tasks/spirit shovel.lua
    Code (Lua):
    1. local chance = {
    2.     {90, "You unearthed a spirit\'s anger!!!", "Enraged Soul"},
    3.     {80, "Your crude digging has angered some ancient ghost.", "Ghost"},
    4.     {70, "You unearthed some not-so-death creature.", "Demon Skeleton"},
    5.     {50, "You unearthed some not-so-death creature.", "Zombie"},
    6.     {1, "You've found nothing special."}
    7. }
    8.  
    9. function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    10.     if isInArray({-1, 4}, player:getStorageValue(SPIKE_UPPER_MOUND_MAIN)) then
    11.         return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    12.     end
    13.  
    14.     if (target == nil) or not target:isItem() or (target:getId() ~= 21561) then
    15.         return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    16.     end
    17.  
    18.     target:transform(21562)
    19.     target:decay()
    20.     local luck = math.random(100)
    21.     for i, result in ipairs(chance) do
    22.         if luck >= result[1] then
    23.             player:sendTextMessage(MESSAGE_INFO_DESCR, result[2])
    24.             if result[3] then
    25.                 Game.createMonster(result[3], toPosition)
    26.             end
    27.             if i == 1 then
    28.                 local sum = player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) + 1
    29.                 player:setStorageValue(SPIKE_UPPER_MOUND_MAIN, sum)
    30.                 if sum == 4 then
    31.                     item:remove()
    32.                     player:sendTextMessage(MESSAGE_INFO_DESCR, "Report the task to Gnomilly.")
    33.                 end
    34.             end
    35.             break
    36.         end
    37.     end
    38.     return toPosition:sendMagicEffect(35)
    39. end
    Create @data/actions/scripts/spike tasks/ghost detector.lua
    Code (Lua):
    1. if not GHOST_DETECTOR_MAP then
    2.     GHOST_DETECTOR_MAP = {}
    3. end
    4.  
    5. ghost_detector_area = {
    6.     from = Position(32008, 32522, 8),
    7.     to = Position(32365, 32759, 10)
    8. }
    9.  
    10. local function getSearchString(fromPos, toPos)
    11.     local distance = 0
    12.     local direction = 0
    13.     local level = 0
    14.  
    15.     local dx = fromPos.x - toPos.x
    16.     local dy = fromPos.y - toPos.y
    17.     local dz = fromPos.z - toPos.z
    18.  
    19.     level = (dz > 0) and 0 or (dz < 0) and 1 or 2
    20.  
    21.     if math.abs(dx) < 5 and math.abs(dy) < 5 then
    22.         distance = 0
    23.     else
    24.         local tmp = dx * dx + dy * dy
    25.         distance = (tmp < 10000) and 1 or (tmp < 75625) and 2 or 3
    26.     end
    27.  
    28.     local tang = (dx ~= 0) and dy / dx or 10
    29.     if math.abs(tang) < 0.4142 then
    30.         direction = (dx > 0) and 3 or 2
    31.     elseif math.abs(tang) < 2.4142 then
    32.         direction = (tang > 0) and ((dy > 0) and 5 or 6) or ((dx > 0) and 7 or 4)
    33.     else
    34.         direction = (dy > 0) and 0 or 1
    35.     end
    36.  
    37.     local text = {
    38.         [0] = {
    39.             [0] = "above you",
    40.             [1] = "below you",
    41.             [2] = "next to you"
    42.         },
    43.         [1] = {
    44.             [0] = "on a higher level to the ",
    45.             [1] = "on a lower level to the ",
    46.             [2] = "to the "
    47.         },
    48.         [2] = "far to the ",
    49.         [3] = "very far to the "
    50.     }
    51.  
    52.     local dirs = {
    53.         [0] = "north",
    54.         [1] = "south",
    55.         [2] = "east",
    56.         [3] = "west",
    57.         [4] = "north-east",
    58.         [5] = "north-west",
    59.         [6] = "south-east",
    60.         [7] = "south-west"
    61.     }
    62.  
    63.     return ((type(text[distance]) == "table") and text[distance][level] or text[distance]) .. ((distance ~= 0) and dirs[direction] or '')
    64. end
    65.  
    66. function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    67.     local stat = player:getStorageValue(SPIKE_UPPER_TRACK_MAIN)
    68.  
    69.     if isInArray({-1, 3}, stat) then
    70.         return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    71.     end
    72.  
    73.     local current = GHOST_DETECTOR_MAP[player:getGuid()]
    74.     if not current then
    75.         local random = getFreeSand()
    76.         GHOST_DETECTOR_MAP[player:getGuid()] = random
    77.         current = random
    78.     end
    79.  
    80.     if player:getPosition():compare(current) then    
    81.         if stat == 2 then
    82.             item:remove()
    83.             GHOST_DETECTOR_MAP[player:getGuid()] = nil
    84.             player:sendTextMessage(MESSAGE_INFO_DESCR, "Report the task to Gnomilly.")
    85.             player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You found a malignant presence, the glowing detector signals that it does not need any further data.")
    86.         else
    87.             GHOST_DETECTOR_MAP[player:getGuid()] = getFreeSand()        
    88.             player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You found a malignant presence, the glowing detector signals another presence nearby.')
    89.         end
    90.         player:setStorageValue(SPIKE_UPPER_TRACK_MAIN, stat+1)
    91.     else
    92.         player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'The detector points ' .. getSearchString(player:getPosition(), current) .. '.')
    93.     end
    94.     return true
    95. end
    Create @data/creaturescripts/scripts/spike tasks/upperspikekill.lua
    Code (Lua):
    1. local range = { -- Only the Demon Skeletons killed on this area count
    2.     from = Position(32008, 32522, 8),
    3.     to = Position(32365, 32759, 10)
    4. }
    5.  
    6. function onKill(creature, target)
    7.     if not isInArray({-1, 7}, creature:getStorageValue(SPIKE_UPPER_KILL_MAIN)) then
    8.         if creature:getPosition():isInRange(range.from, range.to) then
    9.             if target:isMonster() and (target:getMaster() == nil) and (target:getName() == "Demon Skeleton") then
    10.                 local sum = creature:getStorageValue(SPIKE_UPPER_KILL_MAIN) + 1
    11.                 creature:setStorageValue(SPIKE_UPPER_KILL_MAIN, sum)
    12.                 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have slayed ' .. sum .. ' out of 7 Demon Skeletons.')
    13.                 if sum == 7 then
    14.                     creature:sendTextMessage(MESSAGE_INFO_DESCR, "Report the task to Gnomilly.")
    15.                 end
    16.             end
    17.         end
    18.     end
    19. end
    Create @data/npc/Gnomilly.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="Gnomilly" script="Gnomilly.lua" walkinterval="2000" floorchange="0" speechbubble="1">
    3.       <health now="100" max="100" />
    4.       <look type="507" head="14" body="15" legs="91" feet="92" addons="0" />
    5.       <parameters>
    6.           <parameter key="message_greet" value="Hi!" />
    7.     </parameters>  
    8. </npc>
    Create @data/npc/scripts/Gnomilly.lua
    Code (Lua):
    1. local keywordHandler = KeywordHandler:new()
    2. local npcHandler = NpcHandler:new(keywordHandler)
    3. NpcSystem.parseParameters(npcHandler)
    4. local talkState = {}
    5. local levels = {25, 49}
    6.  
    7. function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
    8. function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
    9. function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)    end
    10. function onThink()                            npcHandler:onThink()                        end
    11.  
    12. function creatureSayCallback(cid, type, msg)
    13.     if not npcHandler:isFocused(cid) then
    14.         return false
    15.     end
    16.  
    17.     local player = Player(cid)
    18.  
    19.     if msgcontains(msg, 'job') then
    20.         return npcHandler:say('I\'m the officer responsible for this area. I give out missions, accept mission reports and oversee our defences.', cid)
    21.     end
    22.  
    23.     if msgcontains(msg, 'gnome') then
    24.         return npcHandler:say('We are the only protectors of the world against the enemies below. With small stature comes great responsibilities, as they say.', cid)
    25.     end
    26.  
    27.     if msgcontains(msg, 'area') then
    28.         return npcHandler:say({
    29.             "On these levels we found evidence of some monumental battle that has taken place here centuries ago. We also found some grave sites, but oddly enough no clues of any form of settlement. ...",
    30.             "Some evidence we have found suggests that at least one of the battles here was fought for many, many years. People came here, lived here, fought here and died here. ...",
    31.             "The battles continued until someone or something literally ploughed through the battlefields, turning everything upside down. All this killing and death soaked the area with negative energy. ...",
    32.             "Necromantic forces are running wild all over the place and we are hard-pressed to drive all these undead, spirits and ghosts, away from the Spike. ...",
    33.             "Unless we can secure that area somehow, the Spike operation is threatened to become crippled by the constant attacks of the undead. ...",
    34.             "The whole growing downwards could come to a halt, leaving us exposed to even more attacks, counter attacks, and giving the enemy time to prepare their defences. There's a lot to do for aspiring adventurers."
    35.         }, cid)
    36.     end
    37.  
    38.     if msgcontains(msg, 'mission') then
    39.         if player:getLevel() > levels[2] then
    40.             npcHandler:say('Sorry, but no! Your expertise could be put to better use elsewhere. Here awaits you no challenge. You are desperately needed in the deeper levels of the Spike. Report there immediately. ', cid)
    41.         else
    42.             npcHandler:say('I can offer you several missions: to recharge our ghost {pacifiers}, to {release} the spiritual anger, to {track} an evil presence and to {kill} some demon skeletons.', cid)
    43.         end
    44.         return
    45.     end
    46.  
    47.     if msgcontains(msg, 'report') then
    48.         talkState[cid] = 'report'
    49.         return npcHandler:say('What mission do you want to report about: recharging the ghost {pacifiers}, the {release} of the spiritual anger, about {tracking} an evil presence and the {killing} of demon skeletons?', cid)
    50.     end
    51.  
    52.     if talkState[cid] == 'report' then
    53.         if msgcontains(msg, 'pacifiers') then
    54.             if player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) == -1 then
    55.                 npcHandler:say('You have not started that mission.', cid)
    56.             elseif player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) == 7 then
    57.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    58.                 player:addFamePoint()
    59.                 player:addExperience(1000, true)
    60.                 player:setStorageValue(SPIKE_UPPER_PACIFIER_MAIN, -1)
    61.                 player:setExhaustion(SPIKE_UPPER_PACIFIER_DAILY, 86400)
    62.             else
    63.                 npcHandler:say('Gnowful! Take the resonance charger and use it on seven of the pacifiers in the cave.', cid)
    64.             end
    65.         elseif msgcontains(msg, 'release') then
    66.             if player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) == -1 then
    67.                 npcHandler:say('You have not started that mission.', cid)
    68.             elseif player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) == 4 then
    69.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    70.                 player:addFamePoint()
    71.                 player:addExperience(1000, true)
    72.                 player:setStorageValue(SPIKE_UPPER_MOUND_MAIN, -1)
    73.                 player:setExhaustion(SPIKE_UPPER_MOUND_DAILY, 86400)
    74.             else
    75.                 npcHandler:say('Gnowful! Take the spirit shovel use it on four graves in the cave system.', cid)
    76.             end
    77.         elseif msgcontains(msg, 'tracking') then
    78.             if player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) == -1 then
    79.                 npcHandler:say('You have not started that mission.', cid)
    80.             elseif player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) == 3 then
    81.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    82.                 player:addFamePoint()
    83.                 player:addExperience(1000, true)
    84.                 player:setStorageValue(SPIKE_UPPER_TRACK_MAIN, -1)
    85.                 player:setExhaustion(SPIKE_UPPER_TRACK_DAILY, 86400)
    86.             else
    87.                 npcHandler:say('Gnowful! Take the tracking device in the caves and locate the residual spirit energy.', cid)
    88.             end
    89.         elseif msgcontains(msg, 'killing') then
    90.             if player:getStorageValue(SPIKE_UPPER_KILL_MAIN) == -1 then
    91.                 npcHandler:say('You have not started that mission.', cid)
    92.             elseif player:getStorageValue(SPIKE_UPPER_KILL_MAIN) == 7 then
    93.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    94.                 player:addFamePoint()
    95.                 player:addExperience(1000, true)
    96.                 player:setStorageValue(SPIKE_UPPER_KILL_MAIN, -1)
    97.                 player:setExhaustion(SPIKE_UPPER_KILL_DAILY, 86400)
    98.             else
    99.                 npcHandler:say('Gnowful! Just go out to the caves and kill at least seven demon skeletons.', cid)
    100.             end
    101.         else
    102.             npcHandler:say('That\'s not a valid mission name.', cid)
    103.         end
    104.         talkState[cid] = nil
    105.         return
    106.     end
    107.  
    108.     --[[///////////////////
    109.     ////GHOST PACIFIERS////
    110.     /////////////////////]]
    111.     if msgcontains(msg, 'pacifiers') then
    112.         if player:getExhaustion(SPIKE_UPPER_PACIFIER_DAILY) > 0 then
    113.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_UPPER_PACIFIER_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    114.         end
    115.  
    116.         if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then
    117.             return npcHandler:say('Sorry, you are not on the required range of levels [' .. levels[1] ..'-' .. levels[2] ..'].', cid)
    118.         end
    119.  
    120.         if player:getStorageValue(SPIKE_UPPER_PACIFIER_MAIN) == -1 then  
    121.             npcHandler:say({'We need you to recharge our ghost pacifiers. They are placed at several strategic points in the caves around us and should be easy to find. Your mission would be to charge seven of them.', 'If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?'}, cid)
    122.             talkState[cid] = 'pacifiers'
    123.         else
    124.             npcHandler:say('You have already started that mission.', cid)
    125.         end
    126.     end
    127.  
    128.     if talkState[cid] == 'pacifiers' then
    129.         if msgcontains(msg, 'yes') then
    130.             player:addItem(21554, 1)
    131.             player:setStorageValue(SPIKE_UPPER_PACIFIER_MAIN, 0)
    132.             npcHandler:say('Gnometastic! Take this resonance charger and use it on seven of the pacifiers in the cave. If you lose the charger, you\'ll have to bring your own. Gnomux sells all the equipment that is required for our missions.', cid)
    133.             talkState[cid] = nil
    134.         elseif msgcontains(msg, 'no') then
    135.             npcHandler:say('Ok then.', cid)
    136.             talkState[cid] = nil
    137.         end
    138.     end
    139.  
    140.     --[[///////////////////
    141.     ////SPIRIT RELEASE/////
    142.     /////////////////////]]
    143.     if msgcontains(msg, 'release') then
    144.         if player:getExhaustion(SPIKE_UPPER_MOUND_DAILY) > 0 then
    145.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_UPPER_MOUND_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    146.         end
    147.  
    148.         if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then
    149.             return npcHandler:say('Sorry, you are not on the required range of levels [' .. levels[1] ..'-' .. levels[2] ..'].', cid)
    150.         end
    151.  
    152.         if player:getStorageValue(SPIKE_UPPER_MOUND_MAIN) == -1 then  
    153.             npcHandler:say('Your task would be to use a spirit shovel to release some spirit\'s anger from graves that can be found all around here. If you are interested, I can give you some more information about it. Are you willing to accept this mission?', cid)
    154.             talkState[cid] = 'release'
    155.         else
    156.             npcHandler:say('You have already started that mission.', cid)
    157.         end
    158.     end
    159.  
    160.     if talkState[cid] == 'release' then
    161.         if msgcontains(msg, 'yes') then
    162.             player:addItem(21553, 1)
    163.             player:setStorageValue(SPIKE_UPPER_MOUND_MAIN, 0)
    164.             npcHandler:say('Gnometastic! Take this spirit shovel and use it on four graves in the cave system. If you lose the shovel you\'ll have to bring your own. Gnomux sells all the equipment that is required for our missions.', cid)
    165.             talkState[cid] = nil
    166.         elseif msgcontains(msg, 'no') then
    167.             npcHandler:say('Ok then.', cid)
    168.             talkState[cid] = nil
    169.         end
    170.     end
    171.  
    172.     --[[/////////////////
    173.     ////TRACK GHOSTS/////
    174.     ///////////////////]]
    175.     if msgcontains(msg, 'track') then
    176.         if player:getExhaustion(SPIKE_UPPER_TRACK_DAILY) > 0 then
    177.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_UPPER_TRACK_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    178.         end
    179.  
    180.         if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then
    181.             return npcHandler:say('Sorry, you are not on the required range of levels [' .. levels[1] ..'-' .. levels[2] ..'].', cid)
    182.         end
    183.  
    184.         if player:getStorageValue(SPIKE_UPPER_TRACK_MAIN) == -1 then  
    185.             npcHandler:say({'You\'d be given the highly important task to track down an enormously malevolent spiritual presence in the cave system. Use your tracking device to find out how close you are to the presence.','Use that information to find the residual energy and use the tracker there. If you are interested, I can give you some more information about it. Are you willing to accept this mission?'}, cid)
    186.             talkState[cid] = 'track'
    187.         else
    188.             npcHandler:say('You have already started that mission.', cid)
    189.         end
    190.     end
    191.  
    192.     if talkState[cid] == 'track' then
    193.         if msgcontains(msg, 'yes') then
    194.             GHOST_DETECTOR_MAP[player:getGuid()] = getFreeSand()
    195.             player:addItem(21555, 1)
    196.             player:setStorageValue(SPIKE_UPPER_TRACK_MAIN, 0)
    197.             npcHandler:say('Gnometastic! Use this tracking device in the caves and locate the residual spirit energy. If you lose the tracking device, you\'ll have to bring your own. Gnomux sells all the equipment that is required for our missions.', cid)
    198.             talkState[cid] = nil
    199.         elseif msgcontains(msg, 'no') then
    200.             npcHandler:say('Ok then.', cid)
    201.             talkState[cid] = nil
    202.         end
    203.     end
    204.  
    205.     --[[/////////
    206.     ////KILL/////
    207.     ///////////]]
    208.     if msgcontains(msg, 'kill') then
    209.         if player:getExhaustion(SPIKE_UPPER_KILL_DAILY) > 0 then
    210.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_UPPER_KILL_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    211.         end
    212.  
    213.         if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then
    214.             return npcHandler:say('Sorry, you are not on the required range of levels [' .. levels[1] ..'-' .. levels[2] ..'].', cid)
    215.         end
    216.  
    217.         if player:getStorageValue(SPIKE_UPPER_KILL_MAIN) == -1 then  
    218.             npcHandler:say('We need someone to reduce the steadily growing number of demon skeletons in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?', cid)
    219.             talkState[cid] = 'kill'
    220.         else
    221.             npcHandler:say('You have already started that mission.', cid)
    222.         end
    223.     end
    224.  
    225.     if talkState[cid] == 'kill' then
    226.         if msgcontains(msg, 'yes') then
    227.             player:setStorageValue(SPIKE_UPPER_KILL_MAIN, 0)
    228.             npcHandler:say('Gnometastic! Just go out and kill them. You should find more of them than you like.', cid)
    229.             talkState[cid] = nil
    230.         elseif msgcontains(msg, 'no') then
    231.             npcHandler:say('Ok then.', cid)
    232.             talkState[cid] = nil
    233.         end
    234.     end
    235.     return true
    236. end
    237.  
    238. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    239. npcHandler:addModule(FocusModule:new())
     
    EnzzoCaaue, HalfAway and Xikini like this.
  3. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Middle Spike Tasks

    Add @data/movements/movements.xml
    Code (Lua):
    1. <!-- Spike Tasks Quest -->
    2. <movevent event="StepIn" actionid="1000" script="middlespike.lua"/>
    Create @data/movements/scripts/middlespike.lua
    Code (Lua):
    1. local condition = createConditionObject(CONDITION_OUTFIT)
    2. setConditionParam(condition, CONDITION_PARAM_TICKS, 120000)
    3. addOutfitCondition(condition, 0, 307, 0, 0, 0, 0)
    4.  
    5. function onStepIn(creature, item, position, fromPosition)
    6.     local player = creature:getPlayer()
    7.     if (player == nil) or player:isInGhostMode() then
    8.         creature:teleportTo(fromPosition)
    9.         return true
    10.     end
    11.  
    12.     local tasksLoaded = {}
    13.     if not isInArray({-1, 8}, player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN)) then
    14.         tasksLoaded["NEST"] = true
    15.     end
    16.     if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == 1 then
    17.         tasksLoaded["CHARGE"] = true
    18.     end
    19.  
    20.     if not tasksLoaded["NEST"] and not tasksLoaded["CHARGE"] then
    21.         player:teleportTo(fromPosition)
    22.         return true
    23.     end
    24.  
    25.     if tasksLoaded["NEST"] then
    26.         if player:getCondition(CONDITION_OUTFIT) or (player:getOutfit().lookType == 307) then
    27.             player:teleportTo(fromPosition)
    28.             return true
    29.         end
    30.         player:addCondition(condition)
    31.         player:getPosition():sendMagicEffect(11)
    32.     end
    33.  
    34.     if tasksLoaded["CHARGE"] then
    35.         player:getPosition():sendMagicEffect(12)
    36.         player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, 2)
    37.         player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "You have charged your body with geomantic energy and can report about it.")
    38.     end
    39.     return true
    40. end
    Create @data/actions/scripts/spike tasks/nests.lua
    Code (Lua):
    1. local summon = {"Spider", "Larva", "Scarab", "Tarantula"}
    2.  
    3. function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    4.     if isInArray({-1, 8}, player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN)) then
    5.         return false
    6.     end
    7.  
    8.     if player:getOutfit().lookType ~= 307 then
    9.         return false
    10.     end
    11.  
    12.     local sum = player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) + 1
    13.     player:setStorageValue(SPIKE_MIDDLE_NEST_MAIN, sum)
    14.     player:sendTextMessage(MESSAGE_STATUS_SMALL, "You have destroyed a monster nest.")
    15.  
    16.     if sum == 8 then
    17.         player:sendTextMessage(MESSAGE_INFO_DESCR, "Report the task to Gnombold.")
    18.     end
    19.  
    20.     if math.random(100) > 60 then
    21.         Game.createMonster(summon[math.random(#summon)], player:getPosition())
    22.     end
    23.  
    24.     item:transform(21560)
    25.     item:decay()
    26.     toPosition:sendMagicEffect(17)
    27.     return true
    28. end
    Create @data/actions/scripts/spike tasks/fertilizer.lua
    Code (Lua):
    1. if not FERTILIZED_MUSHROOMS then
    2.     FERTILIZED_MUSHROOMS = {}
    3. end
    4.  
    5. function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    6.     if isInArray({-1, 4}, player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN)) then
    7.         return false
    8.     end
    9.  
    10.     if (target == nil) or not target:isItem() or (target:getId() ~= 21565) then
    11.         return false
    12.     end
    13.  
    14.     if not FERTILIZED_MUSHROOMS[player:getGuid()] then
    15.         FERTILIZED_MUSHROOMS[player:getGuid()] = {}
    16.     end
    17.  
    18.     local mushPos = Position(toPosition.x, toPosition.y, toPosition.z)
    19.     if isInArray(FERTILIZED_MUSHROOMS[player:getGuid()], mushPos) then
    20.         return player:sendCancelMessage("You have already fertilised this mushroom.")
    21.     end
    22.  
    23.     table.insert(FERTILIZED_MUSHROOMS[player:getGuid()], mushPos)
    24.     local sum = player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) + 1
    25.     player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN, sum)
    26.  
    27.     if sum == 4 then
    28.         item:remove()
    29.         player:sendTextMessage(MESSAGE_INFO_DESCR, "Report the task to Gnombold.")
    30.     end
    31.     return toPosition:sendMagicEffect(46)
    32. end
    Create @data/actions/scripts/spike tasks/lodestone.lua
    Code (Lua):
    1. local transformTo = {
    2.     [21557] = 21566,
    3.     [21566] = 21568,
    4. }
    5.  
    6. local area = { --area where to teleport
    7.     Position(32152, 32502, 11), Position(32365, 32725, 12)
    8. }
    9.  
    10. function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    11.     if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) ~= 0 then
    12.         return false
    13.     end
    14.  
    15.     if (target == nil) or not target:isItem() or (target:getId() ~= 21567) then
    16.         return false
    17.     end
    18.  
    19.     target:transform(21713)
    20.     target:decay()
    21.     if item:getId() == 21568 then
    22.         player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, 1)
    23.         player:getPosition():sendMagicEffect(12)
    24.         player:say('Your tinkering caused some kind of magnetic storm that caused you to get disorientated.', TALKTYPE_MONSTER_SAY)
    25.         item:remove()
    26.     else
    27.         item:transform(transformTo[item:getId()])
    28.         if math.random(100) > 60 then
    29.             player:teleportTo(getFreePosition(area[1], area[2]))
    30.             player:getPosition():sendMagicEffect(11)    
    31.         end
    32.     end
    33.     return toPosition:sendMagicEffect(12)
    34. end
    Create @data/creaturescripts/scripts/spike tasks/middlespikekill.lua
    Code (Lua):
    1. local range = { -- Only the Crystalcrushers killed on this area count
    2.     from = Position(32100, 32470, 11),
    3.     to = Position(32380, 32725, 12)
    4. }
    5.  
    6. function onKill(creature, target)
    7.     if not isInArray({-1, 7}, creature:getStorageValue(SPIKE_MIDDLE_KILL_MAIN)) then
    8.         if creature:getPosition():isInRange(range.from, range.to) then
    9.             if target:isMonster() and (target:getMaster() == nil) and (target:getName() == "Crystalcrusher") then
    10.                 local sum = creature:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) + 1
    11.                 creature:setStorageValue(SPIKE_MIDDLE_KILL_MAIN, sum)
    12.                 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have slayed ' .. sum .. ' out of 7 crystalcrushers.')
    13.                 if sum == 7 then
    14.                     creature:sendTextMessage(MESSAGE_INFO_DESCR, "Report the task to Gnombold.")
    15.                 end
    16.             end
    17.         end
    18.     end
    19. end
    Create @data/npc/Gnombold.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="Gnombold" script="Gnombold.lua" walkinterval="2000" floorchange="0" speechbubble="1">
    3.       <health now="100" max="100" />
    4.       <look type="493" head="40" body="81" legs="101" feet="57" addons="0" />
    5.       <parameters>
    6.           <parameter key="message_greet" value="Hi!" />
    7.     </parameters>    
    8. </npc>
    Create @data/npc/scripts/Gnombold.lua
    Code (Lua):
    1. local keywordHandler = KeywordHandler:new()
    2. local npcHandler = NpcHandler:new(keywordHandler)
    3. NpcSystem.parseParameters(npcHandler)
    4. local talkState = {}
    5. local levels = {50, 79}
    6.  
    7. function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
    8. function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
    9. function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)    end
    10. function onThink()                            npcHandler:onThink()                        end
    11.  
    12. function creatureSayCallback(cid, type, msg)
    13.     if not npcHandler:isFocused(cid) then
    14.         return false
    15.     end
    16.  
    17.     local player = Player(cid)
    18.  
    19.     if msgcontains(msg, 'job') then
    20.         return npcHandler:say('I\'m the officer responsible for this area. I give out missions, accept mission reports and oversee our defences.', cid)
    21.     end
    22.  
    23.     if msgcontains(msg, 'gnome') then
    24.         return npcHandler:say('Gnomes have lived autonomous for so long that it still feels odd to work with strangers for many of us.', cid)
    25.     end
    26.  
    27.     if msgcontains(msg, 'area') then
    28.         return npcHandler:say({
    29.             "The levels around us are... well, they are strange. We are still not entirely sure how they were created. It seems obvious that they are artificial, but they seem not to be burrowed or the like. ... ",
    30.             "We found strange stone formations that were not found on other layers around the Spike, but there is no clue at all if they are as natural as they look. It seems someone used some geomantic force to move the earth. ...",
    31.             "For what reason this has been done we can't tell as we found no clues of colonisation. ...",
    32.             "There are theories that the caves are some kind of burrow of some extinct creature or even creatures that are still around us, but exist as some form of invisible energy; but those theories are far-fetched and not supported by any discoveries. ...",
    33.             "Be that as it may, whatever those caves were meant for, these days they are crawling with creatures of different kinds and all are hostile towards us. The competition for food is great down here, and everything is seen as prey by the cave dwellers. ...",
    34.             "Some would like to feast on the crystal of the Spike, others would prefer a diet of gnomes. What they have in common is that they are a threat. If we can't keep them under control their constant attacks and raids on the Spike will wear us down. ...",
    35.             "That's where adventurers fit in to save the day. ",
    36.         }, cid)
    37.     end
    38.  
    39.     if msgcontains(msg, 'mission') then
    40.         if player:getLevel() > levels[2] then
    41.             npcHandler:say('Sorry, but no! Your expertise could be put to better use elsewhere. Here awaits you no challenge. You are desperately needed in the deeper levels of the Spike. Report there immediately. ', cid)
    42.         else
    43.             npcHandler:say(' I can offer you several missions: to gather geomantic {charges}, to {fertilise} the mushroom caves, to destroy monster {nests} and to {kill} some crystal crushers.', cid)
    44.         end
    45.         return
    46.     end
    47.  
    48.     if msgcontains(msg, 'report') then
    49.         talkState[cid] = 'report'
    50.         return npcHandler:say('What mission do you want to report about: gathering the geomantic {charges}, the {fertilisation} of the mushroom caves, about destroying monster {nests} and the {killing} of crystal crushers?', cid)
    51.     end
    52.  
    53.     if talkState[cid] == 'report' then
    54.         if msgcontains(msg, 'charges') then
    55.             if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == -1 then
    56.                 npcHandler:say('You have not started that mission.', cid)
    57.             elseif player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == 2 then
    58.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    59.                 player:addFamePoint()
    60.                 player:addExperience(2000, true)
    61.                 player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, -1)
    62.                 player:setExhaustion(SPIKE_MIDDLE_CHARGE_DAILY, 86400)
    63.             else
    64.                 npcHandler:say('Gnowful! Charge this magnet at three monoliths in the cave system. With three charges, the magnet will disintegrate and charge you with its gathered energies. Step on the magnetic extractor here to deliver the charge to us, then report to me.', cid)
    65.             end
    66.         elseif msgcontains(msg, 'fertilisation') then
    67.             if player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) == -1 then
    68.                 npcHandler:say('You have not started that mission.', cid)
    69.             elseif player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) == 4 then
    70.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    71.                 player:addFamePoint()
    72.                 player:addExperience(2000, true)
    73.                 player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN, -1)
    74.                 player:setExhaustion(SPIKE_MIDDLE_MUSHROOM_DAILY, 86400)
    75.             else
    76.                 npcHandler:say('Gnowful! Use the fertiliser on four gardener mushroom in the caves.', cid)
    77.             end
    78.         elseif msgcontains(msg, 'nests') then
    79.             if player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) == -1 then
    80.                 npcHandler:say('You have not started that mission.', cid)
    81.             elseif player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) == 8 then
    82.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    83.                 player:addFamePoint()
    84.                 player:addExperience(2000, true)
    85.                 player:setStorageValue(SPIKE_MIDDLE_NEST_MAIN, -1)
    86.                 player:setExhaustion(SPIKE_MIDDLE_NEST_DAILY, 86400)
    87.             else
    88.                 npcHandler:say('Gnowful! Step into the transformer and destroy eight monster nests.', cid)
    89.             end
    90.         elseif msgcontains(msg, 'killing') then
    91.             if player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) == -1 then
    92.                 npcHandler:say('You have not started that mission.', cid)
    93.             elseif player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) == 7 then
    94.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    95.                 player:addFamePoint()
    96.                 player:addExperience(2000, true)
    97.                 player:setStorageValue(SPIKE_MIDDLE_KILL_MAIN, -1)
    98.                 player:setExhaustion(SPIKE_MIDDLE_KILL_DAILY, 86400)
    99.             else
    100.                 npcHandler:say('Gnowful! Just go out to the caves and kill at least seven crystalcrushers.', cid)
    101.             end
    102.         else
    103.             npcHandler:say('That\'s not a valid mission name.', cid)
    104.         end
    105.         talkState[cid] = nil
    106.         return
    107.     end
    108.  
    109.     --[[/////////////////////
    110.     ////GEOMANTIC CHARGES////
    111.     ///////////////////////]]
    112.     if msgcontains(msg, 'charges') then
    113.         if player:getExhaustion(SPIKE_MIDDLE_CHARGE_DAILY) > 0 then
    114.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_MIDDLE_CHARGE_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    115.         end
    116.  
    117.         if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then
    118.             return npcHandler:say('Sorry, you are not on the required range of levels [' .. levels[1] ..'-' .. levels[2] ..'].', cid)
    119.         end
    120.  
    121.         if player:getStorageValue(SPIKE_MIDDLE_CHARGE_MAIN) == -1 then    
    122.             npcHandler:say({'Our mission for you is to use a magnet on three different monoliths in the cave system here. After the magnet evaporates on the last charge, enter the magnetic extractor here to deliver your charge.', 'If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?'}, cid)
    123.             talkState[cid] = 'charges'
    124.         else
    125.             npcHandler:say('You have already started that mission.', cid)
    126.         end
    127.     end
    128.  
    129.     if talkState[cid] == 'charges' then
    130.         if msgcontains(msg, 'yes') then
    131.             player:addItem(21557, 1)
    132.             player:setStorageValue(SPIKE_MIDDLE_CHARGE_MAIN, 0)
    133.             npcHandler:say({'Gnometastic! Charge this magnet at three monoliths in the cave system. With three charges, the magnet will disintegrate and charge you with its gathered energies. Step on the magnetic extractor here to deliver the charge to us, then report to me.','If you lose the magnet you\'ll have to bring your own. Gnomux sells all the equipment that is required for our missions.'}, cid)
    134.             talkState[cid] = nil
    135.         elseif msgcontains(msg, 'no') then
    136.             npcHandler:say('Ok then.', cid)
    137.             talkState[cid] = nil
    138.         end
    139.     end
    140.  
    141.     --[[/////////////
    142.     ////FERTILISE////
    143.     ///////////////]]
    144.     if msgcontains(msg, 'fertilise') then
    145.         if player:getExhaustion(SPIKE_MIDDLE_MUSHROOM_DAILY) > 0 then
    146.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    147.         end
    148.  
    149.         if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then
    150.             return npcHandler:say('Sorry, you are not on the required range of levels [' .. levels[1] ..'-' .. levels[2] ..'].', cid)
    151.         end
    152.  
    153.         if player:getStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN) == -1 then    
    154.             npcHandler:say('Your mission would be to seek out gardener mushrooms in the caves and use some fertiliser on them. If you are interested, I can give you some more information about it. Are you willing to accept this mission?', cid)
    155.             talkState[cid] = 'fertilise'
    156.         else
    157.             npcHandler:say('You have already started that mission.', cid)
    158.         end
    159.     end
    160.  
    161.     if talkState[cid] == 'fertilise' then
    162.         if msgcontains(msg, 'yes') then
    163.             player:addItem(21564)
    164.             player:setStorageValue(SPIKE_MIDDLE_MUSHROOM_MAIN, 0)
    165.             npcHandler:say('Gnometastic! And here is your fertiliser - use it on four gardener mushroom in the caves. If you lose the fertiliser you\'ll have to bring your own. Gnomux sells all the equipment that is required for our missions.', cid)
    166.             talkState[cid] = nil
    167.         elseif msgcontains(msg, 'no') then
    168.             npcHandler:say('Ok then.', cid)
    169.             talkState[cid] = nil
    170.         end
    171.     end
    172.  
    173.     --[[//////////////////
    174.     ////DESTROY NESTS/////
    175.     ////////////////////]]
    176.     if msgcontains(msg, 'nests') then
    177.         if player:getExhaustion(SPIKE_MIDDLE_NEST_DAILY) > 0 then
    178.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_MIDDLE_NEST_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    179.         end
    180.  
    181.         if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then
    182.             return npcHandler:say('Sorry, you are not on the required range of levels [' .. levels[1] ..'-' .. levels[2] ..'].', cid)
    183.         end
    184.  
    185.         if player:getStorageValue(SPIKE_MIDDLE_NEST_MAIN) == -1 then    
    186.             npcHandler:say('Our mission for you is to step into the gnomish transformer and then destroy eight monster nests in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?', cid)
    187.             talkState[cid] = 'nests'
    188.         else
    189.             npcHandler:say('You have already started that mission.', cid)
    190.         end
    191.     end
    192.  
    193.     if talkState[cid] == 'nests' then
    194.         if msgcontains(msg, 'yes') then
    195.             player:setStorageValue(SPIKE_MIDDLE_NEST_MAIN, 0)
    196.             npcHandler:say('Gnometastic! Don\'t forget to step into the transformer before you go out and destroy five monster nests. If your transformation runs out, return to the transformer to get another illusion.', cid)
    197.             talkState[cid] = nil
    198.         elseif msgcontains(msg, 'no') then
    199.             npcHandler:say('Ok then.', cid)
    200.             talkState[cid] = nil
    201.         end
    202.     end
    203.  
    204.     --[[/////////
    205.     ////KILL/////
    206.     ///////////]]
    207.     if msgcontains(msg, 'kill') then
    208.         if player:getExhaustion(SPIKE_MIDDLE_KILL_DAILY) > 0 then
    209.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_MIDDLE_KILL_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    210.         end
    211.  
    212.         if (player:getLevel() < levels[1]) or (player:getLevel() > levels[2]) then
    213.             return npcHandler:say('Sorry, you are not on the required range of levels [' .. levels[1] ..'-' .. levels[2] ..'].', cid)
    214.         end
    215.  
    216.         if player:getStorageValue(SPIKE_MIDDLE_KILL_MAIN) == -1 then    
    217.             npcHandler:say('This mission will require you to kill some crystal crushers for us. If you are interested, I can give you some more information about it. Are you willing to accept this mission?', cid)
    218.             talkState[cid] = 'kill'
    219.         else
    220.             npcHandler:say('You have already started that mission.', cid)
    221.         end
    222.     end
    223.  
    224.     if talkState[cid] == 'kill' then
    225.         if msgcontains(msg, 'yes') then
    226.             player:setStorageValue(SPIKE_MIDDLE_KILL_MAIN, 0)
    227.             npcHandler:say('Gnometastic! You should have no trouble to find enough crystal crushers. Killing seven of them should be enough.', cid)
    228.             talkState[cid] = nil
    229.         elseif msgcontains(msg, 'no') then
    230.             npcHandler:say('Ok then.', cid)
    231.             talkState[cid] = nil
    232.         end
    233.     end
    234.     return true
    235. end
    236.  
    237. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    238. npcHandler:addModule(FocusModule:new())
     
    EnzzoCaaue, HalfAway and Xikini like this.
  4. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Lower Spike Tasks

    Create @data/npc/Gnome Trooper.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="Gnome Trooper" script="Gnome Trooper.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="493" head="59" body="20" legs="39" feet="95" addons="0"/>
    5.     <parameters>
    6.         <parameter key="message_greet" value="Do you have {something} to deliver?"/>
    7.     </parameters>
    8. </npc>
    Create @data/npc/scripts/Gnome Trooper.lua
    Code (Lua):
    1. local keywordHandler = KeywordHandler:new()
    2. local npcHandler = NpcHandler:new(keywordHandler)
    3. NpcSystem.parseParameters(npcHandler)
    4. local response = {
    5.     [0] = "It's a pipe! What can be more relaxing for a gnome than to smoke his pipe after a day of duty at the front. At least it's a chance to do something really dangerous after all!",
    6.     [1] = "Ah, a letter from home! Oh - I had no idea she felt that way! This is most interesting!",
    7.     [2] = "It's a model of the gnomebase Alpha! For self-assembly! With toothpicks...! Yeeaah...! I guess.",
    8.     [3] = "A medal of honour! At last they saw my true worth!"
    9. }
    10.  
    11. if not DELIVERED_PARCELS then
    12.     DELIVERED_PARCELS = {}
    13. end
    14.  
    15. function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
    16. function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
    17. function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)    end
    18. function onThink()                            npcHandler:onThink()                        end
    19.  
    20. function greetCallback(cid)
    21.     local player = Player(cid)
    22.     if isInArray({-1, 4}, player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN)) then
    23.         return false
    24.     end
    25.     if isInArray(DELIVERED_PARCELS[player:getGuid()], Creature(getNpcCid()):getId()) then
    26.         return false
    27.     end
    28.     return true
    29. end
    30.  
    31. function creatureSayCallback(cid, type, msg)
    32.     if not npcHandler:isFocused(cid) then
    33.         return false
    34.     end
    35.  
    36.     local player = Player(cid)
    37.     local status = player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN)
    38.  
    39.     if not DELIVERED_PARCELS[player:getGuid()] then
    40.         DELIVERED_PARCELS[player:getGuid()] = {}
    41.     end
    42.  
    43.     if msgcontains(msg, 'something') and not isInArray({-1, 4}, status) then
    44.         if isInArray(DELIVERED_PARCELS[player:getGuid()], Creature(getNpcCid()):getId()) then
    45.             return true
    46.         end
    47.  
    48.         if not player:removeItem(21569, 1) then
    49.             npcHandler:say("But you don't have it...", cid)
    50.             return npcHandler:releaseFocus(cid)
    51.         end
    52.  
    53.         npcHandler:say(response[player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN)], cid)
    54.         player:setStorageValue(SPIKE_LOWER_PARCEL_MAIN, status + 1)
    55.         table.insert(DELIVERED_PARCELS[player:getGuid()], Creature(getNpcCid()):getId())
    56.         npcHandler:releaseFocus(cid)
    57.     end
    58.     return true
    59. end
    60.  
    61. npcHandler:setCallback(CALLBACK_GREET, greetCallback)
    62. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    63. npcHandler:addModule(FocusModule:new())
    Create @data/npc/A Behemoth.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="A Behemoth" script="undercover.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="55"/>
    5. </npc>
    Create @data/npc/A Dragon Lord.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="A Dragon Lord" script="undercover.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="39"/>
    5. </npc>
    Create @data/npc/A Drillworm.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="A Drillworm" script="undercover.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="527"/>
    5. </npc>
    Create @data/npc/A Lost Basher.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="A Lost Basher" script="undercover.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="538"/>
    5. </npc>
    Create @data/npc/A Lost Husher.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="A Lost Husher" script="undercover.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="537"/>
    5. </npc>
    Create @data/npc/A Lost Thrower.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="A Lost Thrower" script="undercover.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="539"/>
    5. </npc>
    Create @data/npc/A Nightmare Scion.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="A Nightmare Scion" script="undercover.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="321"/>
    5. </npc>
    Create @data/npc/A Vulcongra.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="A Vulcongra" script="undercover.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="509"/>
    5. </npc>
    Create @data/npc/A Wyrm.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="A Wyrm" script="undercover.lua" walkinterval="2000" floorchange="0">
    3.       <health now="100" max="100" />
    4.       <look type="291"/>
    5. </npc>
    Create @data/npc/scripts/undercover.lua
    Code (Lua):
    1. local keywordHandler = KeywordHandler:new()
    2. local npcHandler = NpcHandler:new(keywordHandler)
    3. NpcSystem.parseParameters(npcHandler)
    4.  
    5. if not UNDERCOVER_CONTACTED then
    6.     UNDERCOVER_CONTACTED = {}
    7. end
    8.  
    9. function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
    10. function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
    11. function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)    end
    12. function onThink()                            npcHandler:onThink()                        end
    13.  
    14. function greetCallback(cid)
    15.     local player = Player(cid)
    16.     local status = player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN)
    17.  
    18.     if isInArray({-1, 3}, status) then
    19.         return false
    20.     end
    21.  
    22.     if not UNDERCOVER_CONTACTED[player:getGuid()] then
    23.         UNDERCOVER_CONTACTED[player:getGuid()] = {}
    24.     end
    25.  
    26.     if isInArray(UNDERCOVER_CONTACTED[player:getGuid()], Creature(getNpcCid()):getId()) then
    27.         return false
    28.     end
    29.  
    30.     player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, status + 1)
    31.     table.insert(UNDERCOVER_CONTACTED[player:getGuid()], Creature(getNpcCid()):getId())
    32.     npcHandler:releaseFocus(cid)
    33.     return npcHandler:say("Pssst! Keep it down! <gives you an elaborate report on monster activity>", cid)
    34. end
    35.  
    36. npcHandler:setCallback(CALLBACK_GREET, greetCallback)
    37. npcHandler:addModule(FocusModule:new())
    Create @data/actions/scripts/spike tasks/thermometer.lua
    Code (Lua):
    1. hot_lava_pools = { --all range areas of the 9 lava pools
    2.     {Position(32263, 32481, 13), Position(32274, 32490, 13)},
    3.     {Position(32163, 32558, 13), Position(32173, 32567, 13)},
    4.     {Position(32201, 32667, 13), Position(32211, 32672, 13)},
    5.     {Position(32135, 32606, 14), Position(32143, 32614, 14)},
    6.     {Position(32330, 32519, 14), Position(32339, 32521, 14)},
    7.     {Position(32260, 32697, 14), Position(32272, 32705, 14)},
    8.     {Position(32176, 32493, 15), Position(32186, 32502, 15)},
    9.     {Position(32341, 32577, 15), Position(32347, 32586, 15)},
    10.     {Position(32220, 32643, 15), Position(32223, 32652, 15)},
    11. }
    12.  
    13. if not SPIKE_LOWER_HOTTEST_POOL then
    14.     SPIKE_LOWER_HOTTEST_POOL = math.random(#hot_lava_pools)
    15. end
    16.  
    17. function onUse(player, item, fromPosition, target, toPosition, isHotkey)
    18.     local status = player:getStorageValue(SPIKE_LOWER_LAVA_MAIN)
    19.  
    20.     if isInArray({-1, 1}, status) then
    21.         return player:sendCancelMessage(RETURNVALUE_NOTPOSSIBLE)
    22.     end
    23.  
    24.     if player:getPosition():isInRange(hot_lava_pools[SPIKE_LOWER_HOTTEST_POOL][1], hot_lava_pools[SPIKE_LOWER_HOTTEST_POOL][2]) then
    25.         item:remove()
    26.         player:getPosition():sendMagicEffect(16)
    27.         player:setStorageValue(SPIKE_LOWER_LAVA_MAIN, 1)
    28.         player:sendTextMessage(MESSAGE_EVENT_ADVANCE, "Whew! That was that hot, it melted the thermometer! At least you've found the hot spot!")
    29.     else
    30.         player:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'This is not the hot spot!')
    31.     end
    32.     return true
    33. end
    Create @data/creaturescripts/scripts/spike tasks/lowerspikekill.lua
    Code (Lua):
    1. local range = { -- Only the Drillworms killed on this area count
    2.     from = Position(32120, 32470, 13),
    3.     to = Position(32345, 32710, 15)
    4. }
    5.  
    6. function onKill(creature, target)
    7.     if not isInArray({-1, 7}, creature:getStorageValue(SPIKE_LOWER_KILL_MAIN)) then
    8.         if creature:getPosition():isInRange(range.from, range.to) then
    9.             if target:isMonster() and (target:getMaster() == nil) and (target:getName() == "Drillworm") then
    10.                 local sum = creature:getStorageValue(SPIKE_LOWER_KILL_MAIN) + 1
    11.                 creature:setStorageValue(SPIKE_LOWER_KILL_MAIN, sum)
    12.                 creature:sendTextMessage(MESSAGE_EVENT_ADVANCE, 'You have slayed ' .. sum .. ' out of 7 Drillworms.')
    13.                 if sum == 7 then
    14.                     creature:sendTextMessage(MESSAGE_INFO_DESCR, "Report the task to Gnomargery.")
    15.                 end
    16.             end
    17.         end
    18.     end
    19. end
    Create @data/npc/Gnomargery.xml
    Code (XML):
    1. <?xml version="1.0" encoding="UTF-8"?>
    2. <npc name="Gnomargery" script="Gnomargery.lua" walkinterval="2000" floorchange="0" speechbubble="1">
    3.       <health now="100" max="100" />
    4.       <look type="507" head="96" body="92" legs="96" feet="114" addons="0" />
    5.       <parameters>
    6.           <parameter key="message_greet" value="Hi!" />
    7.     </parameters>      
    8. </npc>
    Create @data/npc/scripts/Gnomargery.lua
    Code (Lua):
    1. local keywordHandler = KeywordHandler:new()
    2. local npcHandler = NpcHandler:new(keywordHandler)
    3. NpcSystem.parseParameters(npcHandler)
    4. local talkState = {}
    5. local level = 80
    6.  
    7. function onCreatureAppear(cid)                npcHandler:onCreatureAppear(cid)            end
    8. function onCreatureDisappear(cid)            npcHandler:onCreatureDisappear(cid)            end
    9. function onCreatureSay(cid, type, msg)        npcHandler:onCreatureSay(cid, type, msg)    end
    10. function onThink()                            npcHandler:onThink()                        end
    11.  
    12. function creatureSayCallback(cid, type, msg)
    13.     if not npcHandler:isFocused(cid) then
    14.         return false
    15.     end
    16.  
    17.     local player = Player(cid)
    18.  
    19.     if msgcontains(msg, 'job') then
    20.         return npcHandler:say('I\'m the officer responsible for this area. I give out missions, accept mission reports and oversee our defences.', cid)
    21.     end
    22.  
    23.     if msgcontains(msg, 'gnome') then
    24.         return npcHandler:say('It\'s good to be a gnome for sure!', cid)
    25.     end
    26.  
    27.     if msgcontains(msg, 'area') then
    28.         return npcHandler:say({
    29.             "On the levels outside, we encountered the first serious resistance of our true enemy. As evidenced by the unnatural heat in an area with little volcanic activity, there is 'something' strange going on here. ...",
    30.             "Even the lava pools we have found here are not actually lava, but rock that was molten pretty much recently without any reasonable connection to some natural heat source. And for all we can tell, the heat is growing, slowly but steadily. ...",
    31.             "This is the first time ever that we can witness our enemy at work. Here we can learn a lot about its operations. ...",
    32.             "How they work, and possibly how to stop them. But therefore expeditions into the depths are necessary. The areas around us are highly dangerous, and a lethal threat to us and the Spike as a whole. ... ",
    33.             "Our first object is to divert the forces of the enemy and weaken them as good as we can while gathering as much information as possible about them and their movements. Only highly skilled adventurers stand a chance to help us down here. ..."
    34.         }, cid)
    35.     end
    36.  
    37.     if msgcontains(msg, 'spike') then
    38.         return npcHandler:say('Now that\'s gnomish ingenuity given shape! Who but a gnome would come up with such a plan to defeat our enemies. ', cid)
    39.     end
    40.  
    41.     if msgcontains(msg, 'mission') then
    42.         if player:getLevel() < level then  
    43.             npcHandler:say('Sorry, but no! Your expertise could be put to better use elsewhere. You are desperately needed in the upper levels of the Spike. Report there immediately. ', cid)
    44.         else
    45.             npcHandler:say('I can offer you several missions: to {deliver} parcels to our boys and girls in the battlefield, to get reports from our {undercover} gnomes, to do some {temperature} measuring and to {kill} some drillworms.', cid)
    46.         end
    47.         return
    48.     end
    49.  
    50.     if msgcontains(msg, 'report') then
    51.         talkState[cid] = 'report'
    52.         return npcHandler:say(' What mission do you want to report about: the {delivery} of parcels, the {undercover} reports, the {temperature} measuring or {kill} of drillworms?', cid)
    53.     end
    54.  
    55.     if talkState[cid] == 'report' then
    56.         if msgcontains(msg, 'delivery') then
    57.             if player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) == -1 then
    58.                 npcHandler:say('You have not started that mission.', cid)
    59.             elseif player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) == 4 then
    60.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    61.                 player:addFamePoint()
    62.                 player:addExperience(3500, true)
    63.                 player:setStorageValue(SPIKE_LOWER_PARCEL_MAIN, -1)
    64.                 player:setExhaustion(SPIKE_LOWER_PARCEL_DAILY, 86400)
    65.             else
    66.                 npcHandler:say('Gnowful! Deliver the four parcels to some of our far away outposts in the caverns.', cid)
    67.             end
    68.         elseif msgcontains(msg, 'undercover') then
    69.             if player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) == -1 then
    70.                 npcHandler:say('You have not started that mission.', cid)
    71.             elseif player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) == 3 then
    72.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    73.                 player:addFamePoint()
    74.                 player:addExperience(3500, true)
    75.                 player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, -1)
    76.                 player:setExhaustion(SPIKE_LOWER_UNDERCOVER_DAILY, 86400)
    77.             else
    78.                 npcHandler:say('Gnowful! Get three reports from our undercover agents posing as monsters in the caves around us.', cid)
    79.             end
    80.         elseif msgcontains(msg, 'temperature') then
    81.             if player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) == -1 then
    82.                 npcHandler:say('You have not started that mission.', cid)
    83.             elseif player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) == 1 then
    84.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    85.                 player:addFamePoint()
    86.                 player:addExperience(3500, true)
    87.                 player:setStorageValue(SPIKE_LOWER_LAVA_MAIN, -1)
    88.                 player:setExhaustion(SPIKE_LOWER_LAVA_DAILY, 86400)
    89.             else
    90.                 npcHandler:say('Gnowful! Use the gnomish temperature measurement device to locate the hottest spot at the lava pools in the cave.', cid)
    91.             end
    92.         elseif msgcontains(msg, 'kill') then
    93.             if player:getStorageValue(SPIKE_LOWER_KILL_MAIN) == -1 then
    94.                 npcHandler:say('You have not started that mission.', cid)
    95.             elseif player:getStorageValue(SPIKE_LOWER_KILL_MAIN) == 7 then
    96.                 npcHandler:say('You have done well. Here, take your reward.', cid)
    97.                 player:addFamePoint()
    98.                 player:addExperience(3500, true)
    99.                 player:setStorageValue(SPIKE_LOWER_KILL_MAIN, -1)
    100.                 player:setExhaustion(SPIKE_LOWER_KILL_DAILY, 86400)
    101.             else
    102.                 npcHandler:say('Gnowful! Just go out to the caves and kill at least seven drillworms.', cid)
    103.             end
    104.         else
    105.             npcHandler:say('That\'s not a valid mission name.', cid)
    106.         end
    107.         talkState[cid] = nil
    108.         return
    109.     end
    110.  
    111.     --[[///////////////////
    112.     ////PARCEL DELIVERY////
    113.     /////////////////////]]
    114.     if msgcontains(msg, 'deliver') then
    115.         if player:getExhaustion(SPIKE_LOWER_PARCEL_DAILY) > 0 then
    116.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_LOWER_PARCEL_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    117.         end
    118.  
    119.         if player:getLevel() < level then
    120.             return npcHandler:say('Sorry, you are not on the required minimum level [' .. level ..'].', cid)
    121.         end
    122.  
    123.         if player:getStorageValue(SPIKE_LOWER_PARCEL_MAIN) == -1 then      
    124.             npcHandler:say('We need someone to bring four parcels to some of our far away outposts in the caverns. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?', cid)
    125.             talkState[cid] = 'delivery'
    126.         else
    127.             npcHandler:say('You have already started that mission.', cid)
    128.         end
    129.     end
    130.  
    131.     if talkState[cid] == 'delivery' then
    132.         if msgcontains(msg, 'yes') then
    133.             player:addItem(21569, 4)
    134.             player:setStorageValue(SPIKE_LOWER_PARCEL_MAIN, 0)
    135.             npcHandler:say({'Gnometastic! Here are the parcels. Regrettably, the labels got lost during transport; but I guess those lonely gnomes won\'t mind as long as they get ANY parcel at all.','If you lose the parcels, you\'ll have to get new ones. Gnomux sells all the equipment that is required for our missions.'}, cid)
    136.             talkState[cid] = nil
    137.         elseif msgcontains(msg, 'no') then
    138.             npcHandler:say('Ok then.', cid)
    139.             talkState[cid] = nil
    140.         end
    141.     end
    142.  
    143.     --[[//////////////
    144.     ////UNDERCOVER////
    145.     ////////////////]]
    146.     if msgcontains(msg, 'undercover') then
    147.         if player:getExhaustion(SPIKE_LOWER_UNDERCOVER_DAILY) > 0 then
    148.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_LOWER_UNDERCOVER_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    149.         end
    150.  
    151.         if player:getLevel() < level then
    152.             return npcHandler:say('Sorry, you are not on the required minimum level [' .. level ..'].', cid)
    153.         end
    154.  
    155.         if player:getStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN) == -1 then      
    156.             npcHandler:say('Someone is needed to get three reports from our undercover agents posing as monsters in the caves around us. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?', cid)
    157.             talkState[cid] = 'undercover'
    158.         else
    159.             npcHandler:say('You have already started that mission.', cid)
    160.         end
    161.     end
    162.  
    163.     if talkState[cid] == 'undercover' then
    164.         if msgcontains(msg, 'yes') then
    165.             player:setStorageValue(SPIKE_LOWER_UNDERCOVER_MAIN, 0)
    166.             npcHandler:say('Gnometastic! Get three reports from our agents. You can find them anywhere in the caves around us. Just keep looking for monsters that behave strangely and give you a wink.', cid)
    167.             talkState[cid] = nil
    168.         elseif msgcontains(msg, 'no') then
    169.             npcHandler:say('Ok then.', cid)
    170.             talkState[cid] = nil
    171.         end
    172.     end
    173.  
    174.     --[[////////////////
    175.     ////TEMPERATURE/////
    176.     //////////////////]]
    177.     if msgcontains(msg, 'temperature') then
    178.         if player:getExhaustion(SPIKE_LOWER_LAVA_DAILY) > 0 then
    179.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_LOWER_LAVA_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    180.         end
    181.  
    182.         if player:getLevel() < level then
    183.             return npcHandler:say('Sorry, you are not on the required minimum level [' .. level ..'].', cid)
    184.         end
    185.  
    186.         if player:getStorageValue(SPIKE_LOWER_LAVA_MAIN) == -1 then
    187.             npcHandler:say('Your task would be to use a gnomish temperature measurement device - short GTMD - to locate the hottest spot at the lava pools in the caves. If you are interested, I can give you some more information about it. Are you willing to accept this mission?', cid)
    188.             talkState[cid] = 'temperature'
    189.         else
    190.             npcHandler:say('You have already started that mission.', cid)
    191.         end
    192.     end
    193.  
    194.     if talkState[cid] == 'temperature' then
    195.         if msgcontains(msg, 'yes') then
    196.             player:addItem(21556, 1)
    197.             player:setStorageValue(SPIKE_LOWER_LAVA_MAIN, 0)
    198.             npcHandler:say('Gnometastic! Find the hottest spot of the lava pools in the caves. If you lose the GTMD before you find the hot spot, you\'ll have to get yourself a new one. Gnomux sells all the equipment that is required for our missions.', cid)
    199.             talkState[cid] = nil
    200.         elseif msgcontains(msg, 'no') then
    201.             npcHandler:say('Ok then.', cid)
    202.             talkState[cid] = nil
    203.         end
    204.     end
    205.  
    206.     --[[/////////
    207.     ////KILL/////
    208.     ///////////]]
    209.     if msgcontains(msg, 'kill') then
    210.         if player:getExhaustion(SPIKE_LOWER_KILL_DAILY) > 0 then
    211.             return npcHandler:say('Sorry, you have to wait ' .. string.diff(player:getStorageValue(SPIKE_LOWER_KILL_DAILY)-os.time()) .. ' before this task gets available again.', cid)
    212.         end
    213.  
    214.         if player:getLevel() < level then
    215.             return npcHandler:say('Sorry, you are not on the required minimum level [' .. level ..'].', cid)
    216.         end
    217.  
    218.         if player:getStorageValue(SPIKE_LOWER_KILL_MAIN) == -1 then      
    219.             npcHandler:say('This mission will require you to kill some drillworms for us. If you are interested, I can give you some more {information} about it. Are you willing to accept this mission?', cid)
    220.             talkState[cid] = 'kill'
    221.         else
    222.             npcHandler:say('You have already started that mission.', cid)
    223.         end
    224.     end
    225.  
    226.     if talkState[cid] == 'kill' then
    227.         if msgcontains(msg, 'yes') then
    228.             player:setStorageValue(SPIKE_LOWER_KILL_MAIN, 0)
    229.             npcHandler:say('Gnometastic! You should have no trouble finding enough drillworms.', cid)
    230.             talkState[cid] = nil
    231.         elseif msgcontains(msg, 'no') then
    232.             npcHandler:say('Ok then.', cid)
    233.             talkState[cid] = nil
    234.         end
    235.     end  
    236.     return true
    237. end
    238.  
    239. npcHandler:setCallback(CALLBACK_MESSAGE_DEFAULT, creatureSayCallback)
    240. npcHandler:addModule(FocusModule:new())
     
    malucooo, EnzzoCaaue, Magenta and 3 others like this.
  5. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Or

    You could just have skipped all those posts and download the entire quest files with instructions here
    [​IMG]
     

    Attached Files:

    Zerchi, Taurus, Tampek and 6 others like this.
  6. silveralol

    silveralol Well-Known Member

    Joined:
    Mar 16, 2010
    Messages:
    1,457
    Likes Received:
    189
    Best Answers:
    7
    trollface HAHAHAH thanks for it ;)
     
  7. cbrm

    cbrm Just another mod Staff Member Global Moderator

    Joined:
    Jan 6, 2009
    Messages:
    6,541
    Likes Received:
    834
    Best Answers:
    0
    Anniversary bump. Don't miss this jewel of script in your servers.
     
    kito2 likes this.
  8. malucooo

    malucooo Active Member

    Joined:
    Sep 5, 2007
    Messages:
    115
    Likes Received:
    28
    Best Answers:
    0
    where i have put the actionid 1000 for movement?
     
  9. kito2

    kito2 https://mtibia.online

    Joined:
    Mar 9, 2009
    Messages:
    3,582
    Likes Received:
    174
    Best Answers:
    1
    Actually is a really good script, it has some minor bugs which need to be solved but works ok.
     
  10. WibbenZ

    WibbenZ Global Moderator Staff Member Global Moderator

    Joined:
    Oct 16, 2008
    Messages:
    6,141
    Likes Received:
    1,106
    Best Answers:
    222
    But if you have fixed them or atleast found them why not post them so they can be fixed.
     
  11. kito2

    kito2 https://mtibia.online

    Joined:
    Mar 9, 2009
    Messages:
    3,582
    Likes Received:
    174
    Best Answers:
    1
    Havent fixed them yet so far. Just a player on my OT reported some errors.
     
  12. WibbenZ

    WibbenZ Global Moderator Staff Member Global Moderator

    Joined:
    Oct 16, 2008
    Messages:
    6,141
    Likes Received:
    1,106
    Best Answers:
    222
    Well you can still post what the problems are insted of saying that the code has bugs in it xD
     
  13. undead mage

    undead mage Member

    Joined:
    Mar 25, 2012
    Messages:
    276
    Likes Received:
    11
    Best Answers:
    0
    Can't it be that the errors are the problem of your ot? Maybe not everything is working as it should on your ot.
     
  14. kito2

    kito2 https://mtibia.online

    Joined:
    Mar 9, 2009
    Messages:
    3,582
    Likes Received:
    174
    Best Answers:
    1
    Spikes Spikes

    Just missing quest log, also there is an error on one NPC named Gnomme Tropper for the task of level 80+ is not answering hi/something/something/something in order to deliver Gnomish Supplies and finally A Nightmare Scion NPC is not answering the respective dialog for its task.
     
    WibbenZ likes this.

Share This Page

Loading...