• 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!

[7.72] OTHire 0.0.1b - Based in OTServ Trunk (Latest)

IIRC, Ezzz made a temporare solution for this. Not sure if it has any side-effects on anything else, but here's what he posted:

In creature.cpp - change function:

void Creature::updateTileCache(const Tile* tile, int32_t dx, int32_t dy)

to

Code:
void Creature::updateTileCache(const Tile* tile, int32_t dx, int32_t dy)
{
    if((std::abs(dx) <= (mapWalkWidth - 1) / 2) &&
        (std::abs(dy) <= (mapWalkHeight - 1) / 2)){

        int32_t x = (mapWalkWidth - 1) / 2 + dx;
        int32_t y = (mapWalkHeight - 1) / 2 + dy;

        if (getMonster())
        {
            localMapCache[y][x] = (tile && tile->__queryAdd(0, this, 1,
                FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE | FLAG_IGNOREBLOCKITEM) == RET_NOERROR);
        }
        else
        {
            localMapCache[y][x] = (tile && tile->__queryAdd(0, this, 1,
                FLAG_PATHFINDING | FLAG_IGNOREFIELDDAMAGE) == RET_NOERROR);
        }
    }
#ifdef __DEBUG__
    else{
        std::cout << "Creature::updateTileCache out of range." << std::endl;
    }
#endif
}
i already had that code
 
Something is wrong in vocations.xml if you turn the attack speed down to 200 it's still going to attack normal. The interval doesn't seem to respond correctly to the interval set in the vocations. Anyone got a fix?
 
Code:
1>e:\sources\ote\libraries\inc\mysql\mysql_com.h(243): error C2146: syntax error : missing ';' before identifier 'fd'
1>e:\sources\ote\libraries\inc\mysql\mysql_com.h(243): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\sources\ote\libraries\inc\mysql\mysql_com.h(243): error C4430: missing type specifier - int assumed. Note: C++ does not support default-int
1>e:\sources\ote\libraries\inc\mysql\mysql_com.h(427): error C2065: 'SOCKET' : undeclared identifier
1>e:\sources\ote\libraries\inc\mysql\mysql_com.h(427): error C2146: syntax error : missing ')' before identifier 's'
1>e:\sources\ote\libraries\inc\mysql\mysql_com.h(428): error C2059: syntax error : ')'

any tips? I am laik, i guess i missed some lib or smth ; ___ ;
 
I'm looking at the sources and I noticed something strange at the attack speed

Code:
if(lastAttack == 0){
  // - 1 to compensate for timer resolution etc.
  lastAttack = OTSYS_TIME() - getAttackSpeed() - 1;
}

OTSYSTIME is only looking for integer values, im not sure if that is the case, but my attack speed set in vocations.xml wont work properly under 1000 ms can this be the reason?
 
Anyone with a formula for knight and paladin to make the damage be closer to 7.4
 

I've read the posts, and looked around in weapons.cpp, but I'm not really sure how i can implement it. I have set the correct attack's on the items. Another thing I dont understand in vocations.xml
Code:
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
                <skill id="0" multiplier="1.2"/>
                <skill id="1" multiplier="1.2"/>
                <skill id="2" multiplier="1.2"/>
                <skill id="3" multiplier="1.2"/>
                <skill id="4" multiplier="1.1"/>
                <skill id="5" multiplier="1.1"/>
                <skill id="6" multiplier="1.1"/>

Would greatly appreciate if anyone could help me fix this
 
I've read the posts, and looked around in weapons.cpp, but I'm not really sure how i can implement it. I have set the correct attack's on the items. Another thing I dont understand in vocations.xml
Code:
<formula meleeDamage="1.0" distDamage="1.0" defense="1.0" armor="1.0"/>
                <skill id="0" multiplier="1.2"/>
                <skill id="1" multiplier="1.2"/>
                <skill id="2" multiplier="1.2"/>
                <skill id="3" multiplier="1.2"/>
                <skill id="4" multiplier="1.1"/>
                <skill id="5" multiplier="1.1"/>
                <skill id="6" multiplier="1.1"/>

Would greatly appreciate if anyone could help me fix this

vocations.xml is about how fast you gain skill tries.

https://github.com/TwistedScorpio/OTHire/blob/master/source/weapons.cpp#L169

Change this:
Code:
return (int32_t)std::ceil(2 * ((float)(attackValue * (attackSkill + 5.8) / 25. + level / 10. - 0.1) / attackFactor) );
For this:
Code:
return (int32_t)std::ceil(2 * ((float)(0.06 * attackValue * attackSkill)/ attackFactor) );

Distance is based on melee, so I think just doing this change will work for both. Tell us if it works haha
 
vocations.xml is about how fast you gain skill tries.

https://github.com/TwistedScorpio/OTHire/blob/master/source/weapons.cpp#L169

Change this:
Code:
return (int32_t)std::ceil(2 * ((float)(attackValue * (attackSkill + 5.8) / 25. + level / 10. - 0.1) / attackFactor) );
For this:
Code:
return (int32_t)std::ceil(2 * ((float)(0.06 * attackValue * attackSkill)/ attackFactor) );

Distance is based on melee, so I think just doing this change will work for both. Tell us if it works haha

changed to 0.065 instead of 0.06 as it sayd on the distance post

Level 40 RP with Distance 60 and bolts(30 attack) TEST:
maxHit: 234~
averageHit: (8 + 234) / 2 = 121 // im not sure if it adds 1 to min damage every 5 levels atm but i will set it to 8 anyway

what it shoud look like?
maxHit: 0.065 * 60 * 30 = 117
avgHit: (8 + 117) / 2 = 62.5

i guess knights have pretty wierd damage aswell, will check later
 
I can not made scripts to buy and sell, look:
Code:
-----Made by Atolon-----
-----Edited by Ispiro---

function giveItemToPlayer(cid, itemid, count, cost, topos)
if (doPlayerRemoveMoney(cid, cost) == true) then
doPlayerAddItem(cid, itemid, count)
doSendMagicEffect(topos, 12)
else

doPlayerSendCancel(cid, "You don\'t have enough money, you need ".. cost .." gold coins.")
return false
end
return true
end

function onUse(cid, item, frompos, item2, topos)
if item.actionid == 2300 then ------------BP BROWM
giveItemToPlayer(cid, 1988, 1, 20, topos)

elseif item.actionid == 2301 then ------------BAG GREEND
giveItemToPlayer(cid, 1991, 1, 10, topos)
elseif item.actionid == 2302 then ------------BAG GREEND
giveItemToPlayer(cid, 1992, 1, 10, topos)

elseif item.actionid == 2303 then ------------BAG RED
giveItemToPlayer(cid, 1993, 1, 10, topos)

elseif item.actionid == 2304 then ------------BAG PURPURE
giveItemToPlayer(cid, 1994, 1, 10, topos)
elseif item.actionid == 2305 then ------------BAG BLUE
giveItemToPlayer(cid, 1995, 1, 10, topos)
elseif item.actionid == 2306 then ------------BAG GREY
giveItemToPlayer(cid, 1996, 1, 10, topos)
elseif item.actionid == 2307 then ------------BAG YELLOW
giveItemToPlayer(cid, 1997, 1, 10, topos)
elseif item.actionid == 2308 then ------------BP GREEND
giveItemToPlayer(cid, 1998, 1, 10, topos)
elseif item.actionid == 2309 then ------------BP GREEND
giveItemToPlayer(cid, 1999, 1, 10, topos)
elseif item.actionid == 2310 then ------------BP RED
giveItemToPlayer(cid, 2000, 1, 10, topos)
elseif item.actionid == 2311 then ------------BP MORADO
giveItemToPlayer(cid, 2001, 1, 10, topos)
elseif item.actionid == 2312 then ------------BP BLUE
giveItemToPlayer(cid, 2002, 1, 10, topos)
elseif item.actionid == 2313 then ------------BP GREY
giveItemToPlayer(cid, 2003, 1, 10, topos)
elseif item.actionid == 2314 then ------------BP YELLOW
giveItemToPlayer(cid, 2004, 1, 10, topos)
elseif item.actionid == 2315 then ------------TORCH
giveItemToPlayer(cid, 2050, 1, 2, topos)
elseif item.actionid == 2316 then ------------XBOW
giveItemToPlayer(cid, 2455, 1, 200, topos)
elseif item.actionid == 2317 then ------------BOLT
giveItemToPlayer(cid, 2543, 15, 20, topos)
elseif item.actionid == 2318 then ------------BOW
giveItemToPlayer(cid, 2456, 1, 200, topos)
elseif item.actionid == 2319 then ------------ARROW
giveItemToPlayer(cid, 2544, 20, 40, topos)
elseif item.actionid == 2320 then ------------SPEAR
giveItemToPlayer(cid, 2389, 10, 20, topos)
elseif item.actionid == 2321 then ------------SABRE
giveItemToPlayer(cid, 2385, 1, 100, topos)
elseif item.actionid == 2322 then ------------LONG SWORD
giveItemToPlayer(cid, 2397, 1, 250, topos)
elseif item.actionid == 2323 then ------------HACHET
giveItemToPlayer(cid, 2386, 1, 170, topos)
elseif item.actionid == 2324 then ------------SWORD
giveItemToPlayer(cid, 2376, 1, 170, topos)
elseif item.actionid == 2325 then ------------scythe
giveItemToPlayer(cid, 2550, 1, 20, topos)
elseif item.actionid == 2326 then ------------MEAT
giveItemToPlayer(cid, 2666, 5, 15, topos)
elseif item.actionid == 2327 then ------------SHOVEL
giveItemToPlayer(cid, 2554, 1, 150, topos)
elseif item.actionid == 2328 then ------------MANA FLUID
giveItemToPlayer(cid, 2006, 7, 150, topos)
elseif item.actionid == 2329 then ------------ROPE
giveItemToPlayer(cid, 2120, 1, 100, topos)
elseif item.actionid == 2330 then ------------FISHING ROAD
giveItemToPlayer(cid, 2580, 1, 100, topos)
elseif item.actionid == 2331 then ------------LEATHER HELMET
giveItemToPlayer(cid, 2461, 1, 80, topos)
elseif item.actionid == 2332 then ------------CHAIN HELMET
giveItemToPlayer(cid, 2458, 1, 150, topos)
elseif item.actionid == 2333 then ------------leather trousers
giveItemToPlayer(cid, 2649, 1, 50, topos)
elseif item.actionid == 2334 then ------------EGG
giveItemToPlayer(cid, 2695, 10, 30, topos)
elseif item.actionid == 2335 then ------------BLANK RUNE
giveItemToPlayer(cid, 2260, 1, 10, topos)
------------BUY RUNES------------
elseif item.actionid == 2336 then ------------UH RUNE
giveItemToPlayer(cid, 2273, 3, 150, topos)
elseif item.actionid == 2337 then ------------SD RUNE
giveItemToPlayer(cid, 2268, 3, 300, topos)
elseif item.actionid == 2338 then ------------HMM RUNE
giveItemToPlayer(cid, 2311, 5, 100, topos)
elseif item.actionid == 2339 then ------------GFB RUNE
giveItemToPlayer(cid, 2304, 3, 175, topos)
elseif item.actionid == 2340 then ------------EXPLOSION RUNE
giveItemToPlayer(cid, 2313, 4, 175, topos)
elseif item.actionid == 2341 then ------------AMULET OF LOST
giveItemToPlayer(cid, 2173, 1, 20000, topos)
elseif item.actionid == 2342 then ------------BP JUNGLE
giveItemToPlayer(cid, 3940, 1, 20, topos)
elseif item.actionid == 2343 then ------------Bolsa JUNGLA
giveItemToPlayer(cid, 3939, 1, 10, topos)
elseif item.actionid == 2344 then ------------strawberry
giveItemToPlayer(cid, 2680, 10, 30, topos)
elseif item.actionid == 2345 then ------------PEARS
giveItemToPlayer(cid, 2673, 10, 30, topos)
elseif item.actionid == 2346 then ------------ORANGE
giveItemToPlayer(cid, 2675, 10, 30, topos)
elseif item.actionid == 2347 then ------------PICK
giveItemToPlayer(cid, 2553, 1, 100, topos)
elseif item.actionid == 2348 then ------------Parcel
if doPlayerRemoveMoney(cid, 15) == true then
doPlayerAddItem(cid, 2595, 1)
doPlayerAddItem(cid, 2599, 1)
doSendMagicEffect(topos,12)
else
doPlayerSendCancel(cid, "You dont have enough money, you need 15 gp.")
end
elseif item.actionid == 2349 then ------------BOX
giveItemToPlayer(cid, 1738, 1, 100, topos)
elseif item.actionid == 2350 then ------------LETTER
giveItemToPlayer(cid, 2597, 1, 10, topos)
elseif item.actionid == 2351 then ------------Power BOLT
giveItemToPlayer(cid, 2547, 100, 500, topos)
elseif item.actionid == 2352 then ------------BOLT
giveItemToPlayer(cid, 2543, 100, 300, topos)
elseif item.actionid == 2353 then ------------BP pirate
giveItemToPlayer(cid, 5926, 1, 20, topos)
elseif item.actionid == 2354 then ------------BAG pirate
giveItemToPlayer(cid, 5927, 1, 10, topos)
elseif item.actionid == 2355 then ------------juice squeezer.
giveItemToPlayer(cid, 5865, 1, 100, topos)
elseif item.actionid == 2356 then ------------APEL
giveItemToPlayer(cid, 2674, 10, 30, topos)
elseif item.actionid == 2357 then ------------BANANAS
giveItemToPlayer(cid, 2676, 10, 30, topos)
elseif item.actionid == 2358 then ------------party trumpet
giveItemToPlayer(cid, 6572, 1, 50, topos)
elseif item.actionid == 2359 then ------------Firework rokect
giveItemToPlayer(cid, 6576, 1, 400, topos)
elseif item.actionid == 2360 then ------------chistmas
giveItemToPlayer(cid, 6502, 1, 600, topos)
elseif item.actionid == 2361 then ------------lamP
giveItemToPlayer(cid, 2064, 1, 700, topos)
elseif item.actionid == 2362 then ------------CASCO BUZO
giveItemToPlayer(cid, 5461, 1, 500, topos)
elseif item.actionid == 2363 then ------------mana rune
giveItemToPlayer(cid, 2316, 20, 3000, topos)
elseif item.actionid == 2364 then ------------BP ice
giveItemToPlayer(cid, 7342, 1, 10, topos)
elseif item.actionid == 2365 then ------------Bag ice
giveItemToPlayer(cid, 7343, 1, 10, topos)
--wand and rod for noob
elseif item.actionid == 2366 then ------------Snakebite Rod
giveItemToPlayer(cid, 2182, 1, 600, topos)
elseif item.actionid == 2367 then ------------Wand of Vortex
giveItemToPlayer(cid, 2190, 1, 600, topos)

elseif item.actionid == 2368 then  ------------life ring
    giveItemToPlayer(cid, 2168, 1, 1500, topos)
elseif item.actionid == 2369 then  ------------time ring
    giveItemToPlayer(cid, 2169, 1, 1500, topos)
--verduras 822
elseif item.actionid == 2370 then ------------potato
giveItemToPlayer(cid, 8838, 10, 30, topos)
elseif item.actionid == 2371 then ------------uvas
giveItemToPlayer(cid, 8839, 10, 30, topos)
elseif item.actionid == 2372 then ------------rasberry
giveItemToPlayer(cid, 8840, 10, 30, topos)
elseif item.actionid == 2373 then ------------lemon
giveItemToPlayer(cid, 8841, 10, 30, topos)
elseif item.actionid == 2374 then ------------cucumber
giveItemToPlayer(cid, 8842, 10, 30, topos)
elseif item.actionid == 2375 then ------------onion
giveItemToPlayer(cid, 8843, 10, 30, topos)
elseif item.actionid == 2376 then ------------jalapeno
giveItemToPlayer(cid, 8844, 10, 30, topos)
elseif item.actionid == 2377 then ------------beetroot
giveItemToPlayer(cid, 8845, 10, 30, topos)

end
return true
end

It has works in the pass with the old OTHire, what happened?
 
Check getHeight() function from a tile, otherwise add it from Avesta itself, and do not let players walk over tiles with height > 1

I could not figure it out, can you help me?
 
Back
Top