Try this:Any fix for pick.lua?
attempt to call global 'doDecayItemTo' NIL VALUE
When I change doDecayItemTo > doDecayItem, then no error in console, but the hole does not dissapear after time
function onUse(cid, item, fromPosition, itemEx, toPosition)
if(itemEx.uid <= 65535 or itemEx.actionid > 0) and (itemEx.itemid == 354 or itemEx.itemid == 355) then
doTransformItem(itemEx.uid, 392)
doDecayItem(itemEx.uid)
doSendMagicEffect(toPosition, CONST_ME_POFF)
return TRUE
end
return FALSE
end
Hey man u got any further on this question would be awesome to get it work rightDO NOT USE THE ROOKGAARD SYSTEM YET !!!
I'M TESTING IT AND FOUND SOME BUGS AND THE SCRIPT CONTAINS FUNCTIONS THAT YOU DON'T HAVE, WHEN I FIX EVERYTHING, I'LL RELEASE HERE FOR YOU BITCHES
attack field runes are destroying campfires wich are magic fields.
Anyone have a fix for this? -> https://github.com/TwistedScorpio/OTHire/issues/39
anyone with a solution for saving items on the map and also for cleaning them on server save or something?
If I remove the field attribute, how can I make it to work as a normal field?Remove the "field" attribute for the camp fires, but make sure they still work as normal "fields"; Be able to get burn effect while walking on them as a normal player, I can't remember how I had fixed it before.
posted a fix, let me know if it can be improved https://github.com/TwistedScorpio/OTHire/issues/39If I remove the field attribute, how can I make it to work as a normal field?
isn't there one already?, or is this something differentThere's map clean code within the server https://github.com/TwistedScorpio/OTHire/blob/master/source/game.cpp#L229
All you'd have to do is add a LUA function (within C++ code) that calls g_game.refreshMap(); of course, it will be slow (not like freezing the server) but that it will be slowly refreshing the tiles.
void Game::proceduralRefresh(Map::TileMap::iterator* begin)
{
if(!begin){
begin = new Map::TileMap::iterator(map->refreshTileMap.begin());
}
// Refresh 250 tiles each cycle
refreshMap(begin, 250);
if(*begin == map->refreshTileMap.end()){
delete begin;
return;
}
// Refresh some items every 100 ms until all tiles has been checked
// For 100k tiles, this would take 100000/2500 = 40s = half a minute
g_scheduler.addEvent(createSchedulerTask(100,
boost::bind(&Game::proceduralRefresh, this, begin)));
}
There doesnt give condition after step in. Small fix adjusted.posted a fix, let me know if it can be improved https://github.com/TwistedScorpio/OTHire/issues/39
local combat = createCombatObject()
setCombatParam(combat, COMBAT_PARAM_TYPE, COMBAT_FIREDAMAGE)
setCombatParam(combat, COMBAT_PARAM_EFFECT, CONST_ME_HITBYFIRE)
setCombatParam(combat, COMBAT_PARAM_PZBLOCK, 1)
local condition = createConditionObject(CONDITION_FIRE)
setConditionParam(condition, CONDITION_PARAM_DELAYED, 1)
addDamageCondition(condition, 2, 4000, -10)
function onStepIn(cid, item, topos, frompos)
if isPlayer(cid) then
doTargetCombatHealth(cid, COMBAT_FIREDAMAGE, -20, -20, CONST_ME_HITBYFIRE)
if not hasCondition(cid, CONDITION_FIRE) then
doAddCondition(cid, condition)
end
end
return true
end
isn't there one already?, or is this something different
Code:void Game::proceduralRefresh(Map::TileMap::iterator* begin) { if(!begin){ begin = new Map::TileMap::iterator(map->refreshTileMap.begin()); } // Refresh 250 tiles each cycle refreshMap(begin, 250); if(*begin == map->refreshTileMap.end()){ delete begin; return; } // Refresh some items every 100 ms until all tiles has been checked // For 100k tiles, this would take 100000/2500 = 40s = half a minute g_scheduler.addEvent(createSchedulerTask(100, boost::bind(&Game::proceduralRefresh, this, begin))); }
also tried to call doRefreshMap(), in a talkaction but nothing seems to happen
Removed that if statement, nothing happens stillYou're almost done
Now you need to remove this IF conditional so that all tiles are refreshable.
https://github.com/TwistedScorpio/OTHire/blob/master/source/map.cpp#L189
Of course, you are going to have to make sure that house tiles aren't refreshed ;P
function onSay(cid, words, param)
doRefreshMap()
return true
end