Yes, the code is there, the only thing you need to create is a method to activate them (lua functions and talkaction)Welcome guys share system is available ? how to compile into my engine ?
<attribute key="type" value="magicfield"/>
local CAMPFIRE = {1423, 1424, 1425}
if(field.itemid ~= 0 and (field.itemid < ITEM_SEARINGFIRE_STAGE_FIRST or field.itemid > ITEM_SEARINGFIRE_STAGE_LAST)) then
if(field.itemid ~= 0 and (field.itemid < ITEM_SEARINGFIRE_STAGE_FIRST or field.itemid > ITEM_SEARINGFIRE_STAGE_LAST) and (not isInArray(CAMPFIRE, field.itemid))) then
if(getCreatureLookDir(cid) == 3) then -- left dir
pos.x = pos.x+3
elseif(getCreatureLookDir(cid) == 1) then -- right dir
pos.x = pos.x-3
elseif(getCreatureLookDir(cid) == 0) then -- north dir
pos.y = pos.y+3
elseif(getCreatureLookDir(cid) == 2) then -- south dir
pos.y = pos.y-3
else
Warning: [ConfigManager::getString] 88
#include "configmanager.h"
extern ConfigManager g_config;
static uint64_t getExpForLevel(int32_t level) {
std::string ExpFormulaType = g_config.getString(ConfigManager::TYPE_FORMULA);
level--;
if(ExpFormulaType == "original") {
return ((50ULL * level * level * level) - (150ULL * level * level) + (400ULL * level))/3ULL;
}
else if(ExpFormulaType == "tibianic") {
return (level * 35ULL) * (level * level * level) / 500ULL + 10ULL * level;
}
else if(ExpFormulaType == "mastercores") {
return ((level * 50ULL) * (level * level * level) / 500ULL)+10ULL;
}
else { // i added that otherwise it would be error
return ((50ULL * level * level * level) - (150ULL * level * level) + (400ULL * level))/3ULL;
}
}
m_confString[TYPE_FORMULA] = getGlobalString(L, "ExpFormulaType", "original");
TYPE_FORMULA,
for some reason I cant edit my previous post :S
Well, I think you are talking about another distro, on OThire there isn't any line like that on destroy_field_rune.lua.:: Bug: Destroy field rune removes campfires ::.
Here's a fix related to that link: https://github.com/TwistedScorpio/OTHire/issues/39
Thanks @Emky for reporting it
Go to items.xml and found those IDs mentioned by you (1423, 1424, 1425)
Set this attribute to them:Code:<attribute key="type" value="magicfield"/>
Now save your items.xml
Now go to folder Spells and found the file destroy_field_rune.lua, open it
Add this:
Code:local CAMPFIRE = {1423, 1424, 1425}
Now replace that line:
Code:if(field.itemid ~= 0 and (field.itemid < ITEM_SEARINGFIRE_STAGE_FIRST or field.itemid > ITEM_SEARINGFIRE_STAGE_LAST)) then
For that one:
Code:if(field.itemid ~= 0 and (field.itemid < ITEM_SEARINGFIRE_STAGE_FIRST or field.itemid > ITEM_SEARINGFIRE_STAGE_LAST) and (not isInArray(CAMPFIRE, field.itemid))) then
Done, campfires will be not removed if you use destroy field rune on them
Is there any function that gets the facing direction of the player, I can only find "doSetCreatureDirection(cid, direction)", I'm trying to improve a premium bridge script.
Also noticed that the direction the player is facing when login is always south, so something is not saving correctly or I'm just missing something, not sure.
.:: Bug: Destroy field rune removes campfires ::.
doMoveCreature(cid, getDirectionTo(getPlayerPosition(cid), toPosition))Is there any function that gets the facing direction of the player, I can only find "doSetCreatureDirection(cid, direction)", I'm trying to improve a premium bridge script.
Also noticed that the direction the player is facing when login is always south, so something is not saving correctly or I'm just missing something, not sure.
Let's say your position is x and you get teleported to x+5 then you should face east?
if(getCreatureLookDir(cid) == 3) then -- left
pos.x = pos.x+5
doSetCreatureDirection(cid, 1)
elseif(getCreatureLookDir(cid) == 1) then -- right
pos.x = pos.x-5
doSetCreatureDirection(cid, 3)
https://github.com/TwistedScorpio/OTHire/wiki/How-to-use-RME-for-this-OTServeri can't load map anyone got a map working pls?