-
-
-
Feyrist includes monsters.xml
Need import map
-
GetMonsters
reupload
-
Feyrist includes monsters.xml
precisam desses items.otb items.zip
-
Tfs 1.2 Delete items em player_items, player_depotitems
i try this: function getAllItemsById(self, id) local containers = {} local items = {} for i = CONST_SLOT_HEAD, CONST_SLOT_AMMO do local item = self:getSlotItem(i) if item then if item:isContainer() then table.insert(containers, item:getUniqueId()) elseif not id or id == item:getId() then table.insert(items, item:getUniqueId()) end end end while #containers > 0 do for k = (Container(containers[1]):getSize() - 1), 0, -1 do local tmp = Container(containers[1]):getItem(k) if tmp:isContainer() then table.insert(containers, tmp:getUniqueId()) elseif not id or id == tmp:getId() then table.insert(items, tmp:getUniqueId()) end end table.remove(containers, 1) end return items end function onSay(player, words, param) for _, item in pairs(getAllItemsById(player, 12571)) do player:sendTextMessage(messageType or MESSAGE_STATUS_CONSOLE_ORANGE, 'I got an item with id ' .. item.itemid .. '.') end end
-
-
-
-
-
Tfs 1.2 Delete items em player_items, player_depotitems
do you think you can help me convert this function to tfs 1.2? function getAllItemsById(cid, id) local containers = {} local items = {} for i = CONST_SLOT_FIRST, CONST_SLOT_LAST do local sitem = getPlayerSlotItem(cid, i) if sitem.uid > 0 then if isContainer(sitem.uid) then table.insert(containers, sitem.uid) elseif not(id) or id == sitem.itemid then table.insert(items, sitem) end end end while #containers > 0 do for k = (getContainerSize(containers[1]) - 1), 0, -1 do local tmp = getContainerItem(containers[1], k) if isContainer(tmp.uid) then table.insert(containers, tmp.uid) elseif not(id) or id == tmp.itemid then table.insert(items, tmp) end end table.remove(containers, 1) end return items end It will return an array with the items. Example: Code (Text): for _, item in pairs(getAllItemsById(cid, 2222)) do doPlayerSay(cid, "I got an item with id " .. item.itemid .. ".") end
-
-
Tfs 1.2 Delete items em player_items, player_depotitems
Are you going to use this script? onLogin? I think if this is it, the player will be offline on verification. R= I had thought to use it in a globalevent. I think the best option would be to use it in OnStartUp, and create another onlogin script, that verifies items on players online, with addEvent (checkitems, 2000) to check the slots and the items inside the backpack
-
Tfs 1.2 Delete items em player_items, player_depotitems
Can not load script: lua:9 ')' expected near 'timerOnExp' try to execute the following command directly in the database with the online player: DELETE FROM `player_items` WHERE `player_id`=196 AND `sid` = 107 and it is not eliminated. I think the same thing happens as when you try to change a player's value, if it is online there is no effect. Can you think of an idea?
-
Tfs 1.2 Delete items em player_items, player_depotitems
now dont have error in console but dont delete items He should have eliminated those 3 items, but they are not deleted
-
Tfs 1.2 Delete items em player_items, player_depotitems
same result only delete for players not connected
-
Tfs 1.2 Delete items em player_items, player_depotitems
only delete if the player is not connected
- Tfs 1.2 Delete items em player_items, player_depotitems
Informação Importante
Confirmação de Termo