• There is NO official Otland's Discord server and NO official Otland's server list. The Otland's Staff does not manage any Discord server or server list. Moderators or administrator of any Discord server or server lists have NO connection to the Otland's Staff. Do not get scammed!

[8.60] The Forgotten Server 0.3.6 (Crying Damson) V8

YES I HAVE AND WHAT POTIONS.LUA TAM have to change to get it working

- - - Updated - - -

NEED VIALE disappeared AFTER USE
 
LOOK MY POTIONS.LUA I DO NOT KNOW WHAT I HAVE TO CHANGE



local config = {
removeOnUse = "no",
usableOnTarget = "yes", -- can be used on target? (fe. healing friend)
splashable = "no",
realAnimation = "no", -- make text effect visible only for players in range 1x1
healthMultiplier = 1.0,
manaMultiplier = 1.0
}

config.removeOnUse = getBooleanFromString(config.removeOnUse)
config.usableOnTarget = getBooleanFromString(config.usableOnTarget)
config.splashable = getBooleanFromString(config.splashable)
config.realAnimation = getBooleanFromString(config.realAnimation)

local POTIONS = {
[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion
[7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion
[7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion
[7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion
[8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion

[7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion
[7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion
[7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion

[8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion
}

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
local potion = POTIONS[item.itemid]
if(not potion) then
return false
end

if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then
if(not config.splashable) then
return false
end

if(toPosition.x == CONTAINER_POSITION) then
toPosition = getThingPos(item.uid)
end

doDecayItem(doCreateItem(2016, potion.splash, toPosition))
doTransformItem(item.uid, potion.empty)
return true
end

if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end

if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and
not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))
then
doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)
return true
end

local health = potion.health
if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then
return false
end

local mana = potion.mana
if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then
return false
end

doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
if(not realAnimation) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
else
for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do
if(isPlayer(tid)) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)
end
end
end

doAddCondition(cid, exhaust)
if(not potion.empty or config.removeOnUse) then
doRemoveItem(item.uid, 1)
return true
end
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, potion.empty, 1)
return true
end
 
Seriously, everytime you update what should i do, like i had my ot running on V3 now when u updated to V4 and V5 do you change any files in data folder or should i just replace the .exe file which runs the ot?
 
Try this:

Lua:
local config = {
removeOnUse = "yes",
usableOnTarget = "yes", -- can be used on target? (fe. healing friend)
splashable = "no",
realAnimation = "no", -- make text effect visible only for players in range 1x1
healthMultiplier = 1.0,
manaMultiplier = 1.0
}

config.removeOnUse = getBooleanFromString(config.removeOnUse)
config.usableOnTarget = getBooleanFromString(config.usableOnTarget)
config.splashable = getBooleanFromString(config.splashable)
config.realAnimation = getBooleanFromString(config.realAnimation)

local POTIONS = {
[8704] = {empty = 7636, splash = 2, health = {50, 100}}, -- small health potion
[7618] = {empty = 7636, splash = 2, health = {100, 200}}, -- health potion
[7588] = {empty = 7634, splash = 2, health = {200, 400}, level = 50, vocations = {3, 4, 7, 8}, vocStr = "knights and paladins"}, -- strong health potion
[7591] = {empty = 7635, splash = 2, health = {500, 700}, level = 80, vocations = {4, 8}, vocStr = "knights"}, -- great health potion
[8473] = {empty = 7635, splash = 2, health = {800, 1000}, level = 130, vocations = {4, 8}, vocStr = "knights"}, -- ultimate health potion

[7620] = {empty = 7636, splash = 7, mana = {70, 130}}, -- mana potion
[7589] = {empty = 7634, splash = 7, mana = {110, 190}, level = 50, vocations = {1, 2, 3, 5, 6, 7}, vocStr = "sorcerers, druids and paladins"}, -- strong mana potion
[7590] = {empty = 7635, splash = 7, mana = {200, 300}, level = 80, vocations = {1, 2, 5, 6}, vocStr = "sorcerers and druids"}, -- great mana potion

[8472] = {empty = 7635, splash = 3, health = {200, 400}, mana = {110, 190}, level = 80, vocations = {3, 7}, vocStr = "paladins"} -- great spirit potion
}

local exhaust = createConditionObject(CONDITION_EXHAUST)
setConditionParam(exhaust, CONDITION_PARAM_TICKS, (getConfigInfo('timeBetweenExActions') - 100))

function onUse(cid, item, fromPosition, itemEx, toPosition)
local potion = POTIONS[item.itemid]
if(not potion) then
return false
end

if(not isPlayer(itemEx.uid) or (not config.usableOnTarget and cid ~= itemEx.uid)) then
if(not config.splashable) then
return false
end

if(toPosition.x == CONTAINER_POSITION) then
toPosition = getThingPos(item.uid)
end

doDecayItem(doCreateItem(2016, potion.splash, toPosition))
doTransformItem(item.uid, potion.empty)
return true
end

if(hasCondition(cid, CONDITION_EXHAUST_HEAL)) then
doPlayerSendDefaultCancel(cid, RETURNVALUE_YOUAREEXHAUSTED)
return true
end

if(((potion.level and getPlayerLevel(cid) < potion.level) or (potion.vocations and not isInArray(potion.vocations, getPlayerVocation(cid)))) and
not getPlayerCustomFlagValue(cid, PLAYERCUSTOMFLAG_GAMEMASTERPRIVILEGES))
then
doCreatureSay(itemEx.uid, "Only " .. potion.vocStr .. (potion.level and (" of level " .. potion.level) or "") .. " or above may drink this fluid.", TALKTYPE_ORANGE_1)
return true
end

local health = potion.health
if(health and not doCreatureAddHealth(itemEx.uid, math.ceil(math.random(health[1], health[2]) * config.healthMultiplier))) then
return false
end

local mana = potion.mana
if(mana and not doPlayerAddMana(itemEx.uid, math.ceil(math.random(mana[1], mana[2]) * config.manaMultiplier))) then
return false
end

doSendMagicEffect(getThingPos(itemEx.uid), CONST_ME_MAGIC_BLUE)
if(not realAnimation) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1)
else
for i, tid in ipairs(getSpectators(getCreaturePosition(cid), 1, 1)) do
if(isPlayer(tid)) then
doCreatureSay(itemEx.uid, "Aaaah...", TALKTYPE_ORANGE_1, false, tid)
end
end
end

doAddCondition(cid, exhaust)
if(not potion.empty or config.removeOnUse) then
doRemoveItem(item.uid, 1)
return true
end
doRemoveItem(item.uid, 1)
doPlayerAddItem(cid, potion.empty, 1)
return true
end
 
yo otswe please help when i replace V5 .exe with V3 .exe i get this [02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value maleSleeper
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value maleSleeper
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value pickupable
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value currency
[02/08/2012 20:31:59] [Warning - Items::loadFromXml] Unknown key value currency
[02/08/2012 20:32:00] [Warning - Items::loadFromXml] Unknown key value currency
[02/08/2012 20:32:00] [Warning - Items::loadFromXml] Unknown key value absorbPercentAllElements
[02/08/2012 20:32:00] [Warning - Items::loadFromXml] Unknown key value preventItemloss
[02/08/2012 20:32:00] [Warning - Items::loadFromXml] Unknown type rune
 
Please post the item.
 
Items.xml you mean?

- - - Updated - - -

Can't edit my post, i used to change V3 .exe items.otb and items.xml to match remere's items.otb and items.xml
That means on V3 folder i got items.otb and items.xml of remere's map editor 2.1
So when i take off V3 .exe and put V5 .exe instead i get these errors because my items.xml and items.otb doesn't match the items.xml and items.otb on the download link
 
Not whole item.xml only the item you added to items.xml

- - - Updated - - -

I want the item which cause the error
 
I dont know which items are those, i didn't add any items to items.xml its just a bug with new V5 .exe most keys dont work on it.
 
:S upload the items.xml
 
There, V3 items.xml doesn't work with V5 .exe
Code:
http://speedy*****malware.localhost/398MQ/items.xml
 
Ive checked your items.xml and you have changed them into old items.xml or newer items.xml, because these attributes doesnt exsist on 8.54-8.60

- - - Updated - - -

Ive checked your items.xml and you have changed them into old items.xml or newer items.xml, because these attributes doesnt exsist on 8.54-8.60
 
dude, i'm telling u V3 worked with this items.xml what happened with V5

- - - Updated - - -

do you have an email we can chat on instead spamming this thread please
 
Oh god, first day of using linux and compiling tfs. Compiled, and potions repaired. Stack runes repaired. And error with globip solved. :)
items.xml & items.otb:
items.otb - Speedy Share - upload your files here
items.xml - Speedy Share - upload your files here
You have to change evo items like pro wand etc if you want rl serv. But try first with items.otb only. Maybe it work without items.xml. Didn't tested.

Compile error.
Find:
Code:
std::string getGlobalIP()
{
    WSADATA wsaData;
 
    if(WSAStartup(MAKEWORD(2, 0), &wsaData) != 0)
        return "Not found";
 
    SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
    HOSTENT *host;
    host = gethostbyname("www.whatismyip.com");
    SOCKADDR_IN sin;
    memset(&sin, 0, sizeof sin);
 
    sin.sin_family = AF_INET;
    sin.sin_addr.s_addr = ((struct in_addr*)(host->h_addr))->s_addr;
    sin.sin_port = htons(80);
 
    if(connect(s, (struct sockaddr*)&sin, sizeof(sin)) != SOCKET_ERROR){
        //std::cout << "Connected" << std::endl;
        std::string request = "GET http://www.whatismyip.com/automation/n09230945.asp HTTP/1.1\r\nHost: www.whatismyip.com\r\n\r\n";
        if(send(s, request.c_str(), request.length(), 0) != request.length())
            std::cout << "Error sending request: " << WSAGetLastError() << std::endl;
 
        char buffer[2048];
        std::string response;
        recv(s, (char*)&buffer, 2048, 0);
        response = std::string(buffer);
        int start = int(response.find("\r\n\r\n"));
        int iplength = response.length()-start;
 
        std::string ip = "";
        for(int i = start; i < response.length(); i++){
            if((response.at(i) >= '0' && response.at(i) <= '9') || response.at(i) == '.') ip += response.at(i);
        }
 
		closesocket(s);
 
        return ip;
    }
    else{
        std::cout << "Could not connect: " << WSAGetLastError() << std::endl;
    }
 
    return "127.0.0.1"; 
}
Delete.
And:
Code:
	if(ip == "auto"){
		ip = getGlobalIP();
	}
And thats all. But you can't use auto ip in config.

AAaannd sorry for my english. But i want to help only :D
 
Oh god, first day of using linux and compiling tfs. Compiled, and potions repaired. Stack runes repaired. And error with globip solved. :)
items.xml & items.otb:
items.otb - Speedy Share - upload your files here
items.xml - Speedy Share - upload your files here
You have to change evo items like pro wand etc if you want rl serv. But try first with items.otb only. Maybe it work without items.xml. Didn't tested.

Compile error.
Find:
Code:
std::string getGlobalIP()
{
    WSADATA wsaData;
 
    if(WSAStartup(MAKEWORD(2, 0), &wsaData) != 0)
        return "Not found";
 
    SOCKET s = socket(AF_INET, SOCK_STREAM, 0);
    HOSTENT *host;
    host = gethostbyname("www.whatismyip.com");
    SOCKADDR_IN sin;
    memset(&sin, 0, sizeof sin);
 
    sin.sin_family = AF_INET;
    sin.sin_addr.s_addr = ((struct in_addr*)(host->h_addr))->s_addr;
    sin.sin_port = htons(80);
 
    if(connect(s, (struct sockaddr*)&sin, sizeof(sin)) != SOCKET_ERROR){
        //std::cout << "Connected" << std::endl;
        std::string request = "GET http://www.whatismyip.com/automation/n09230945.asp HTTP/1.1\r\nHost: www.whatismyip.com\r\n\r\n";
        if(send(s, request.c_str(), request.length(), 0) != request.length())
            std::cout << "Error sending request: " << WSAGetLastError() << std::endl;
 
        char buffer[2048];
        std::string response;
        recv(s, (char*)&buffer, 2048, 0);
        response = std::string(buffer);
        int start = int(response.find("\r\n\r\n"));
        int iplength = response.length()-start;
 
        std::string ip = "";
        for(int i = start; i < response.length(); i++){
            if((response.at(i) >= '0' && response.at(i) <= '9') || response.at(i) == '.') ip += response.at(i);
        }
 
		closesocket(s);
 
        return ip;
    }
    else{
        std::cout << "Could not connect: " << WSAGetLastError() << std::endl;
    }
 
    return "127.0.0.1"; 
}
Delete.
And:
Code:
	if(ip == "auto"){
		ip = getGlobalIP();
	}
And thats all. But you can't use auto ip in config.

AAaannd sorry for my english. But i want to help only :D
Do those items.otb and items.xml match remere's 2.1 ones? If yea, will they work without those errors mentioned above?
 
When the server starts to load monsters and spawns it closes out completely. It doesn't start the server at all.
 
Back
Top