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

Search results

  1. pasiak12

    Lua primaryDamage * 2 doesn't work correctly with attacks?

    What protocol? as far I remember melee dmg was always taken from normal_random(0, max_dmg) Add some prints and watch terminal function onHealthChange(creature, attacker, primaryDamage, primaryType, secondaryDamage, secondaryType, origin) print("Primary dmg = "..primaryDamage)...
  2. pasiak12

    How to add Outfit to OTHire?

    In protocolgame.cpp just create new method by copying outfitwindow function and modifty it to work with single outfit id given by argument. Then call it from lua level. Theres my function used on YurOtsX server int LuaScriptInterface::luaPlayerSendOutfitWindowForOne(lua_State* L) { //...
  3. pasiak12

    Critical system

    I forgot that monsters can go through it too. So before we we check AXE_SKILL we need to make sure were working with player, so if (attacker && attacker->getPlayer()) { Player* player = attacker->getPlayer(); <crit function> } Otherwise if it try to read AXE_SKILL from monster...
  4. pasiak12

    Set Storage to players

    Where and why you want use player storage? What the purpose of that script? All I can see: player can pull the lever if globalstorage let him to and there aren't any players (boss room?). Otherwise the globalstorage storage saves the next timeout and something happen (prepareEnter func, tp...
  5. pasiak12

    How to add Outfit to OTHire?

    In game procotolcpp you got method for outfit window. I put comments for better understanding void ProtocolGame::sendOutfitWindow() { NetworkMessage_ptr msg = getOutputBuffer(); if (msg){ msg->AddByte(0xC8); //code for client to open outfit window AddCreatureOutfit(msg...
  6. pasiak12

    Critical system

    Well, you have really interesting function there. May I ask what version is it? As you can read there is main IF function if(healthChange > 0). We are interested in negative value of healthChange since its the damage, so we go into else brackets. After if(damage != 0), we can start to modifty...
  7. pasiak12

    Critical system

    You are checking only dmg coming from melee weapons. The combat is some kind of magic damage (but player see it as normal melee) To checkout every dmg you need to get into another function. Do the check for critical chance in combatchangehealth method in game.cpp file. Also add the dmg...
  8. pasiak12

    Solved Three different items cause different damage

    I made fast example with new combat on weapon with id 9999. There are explanations in comments. Hope it help you to better understand the code -- combat definition and its params local combat = createCombatObject() setCombatParam(combat, COMBAT_PARAM_BLOCKARMOR, 1) setCombatParam(combat...
  9. pasiak12

    tfs 1.2 item give + xxx damage more to spells

    As far I remember its possible to distinguish magic damage from melee dmg, then there is an easy way to do that thing for all spells at once, but would require source edits. With lua edit, you are able to do it in similiar way like example in post above, but better do this in function...
  10. pasiak12

    C++ onDeath all monsters

    Im not sure how exactly works on 0.4, but usually you need to register the event on the actual monster. To do that, you should find some onSpawn() function and apply it to every monster just after spawn on the map. It should be placed in events.
  11. pasiak12

    The community recommendation thread.

    I have done some scripting job for @Kubakos C++ and LUA edits. He paid me for this via paypal. I can confirm he is solvent.
  12. pasiak12

    Need attribute which add health/mana

    Check your items.h if you already have that feature. Otherwise you will need to add it yourself. You can also check items.xml if theres already any item using it.
  13. pasiak12

    Problem with walkback movement script

    You can register another things to work with that walkback script <movevent type="StepIn" itemid="1738" event="script" value="walkback.lua"/> where you can set another item id on itemid="1738" part You can also set it to action or unique id.
  14. pasiak12

    [Lua] when monster with name xxx "kills" player then player tp to pos and not get killed

    Sry my bad then. Do the function addHealth~ works in another situations?
  15. pasiak12

    [Lua] when monster with name xxx "kills" player then player tp to pos and not get killed

    Have you registered that script in some creaturescript.xml (or smth like this, Im not sure if its not event feature or even smth else) You can set simple print at the start of the func to check if it even execute after player death.
  16. pasiak12

    count more than 1 creature

    It counts, but counts only first? What do you mean? It counts only the troll, but not swamp troll? Can you provide more details?
  17. pasiak12

    count more than 1 creature

    You can't have more than 1 element with the same name ('nome' in that case :D) You can try add them as separate monsters with the same storage, they would save in. For example: [1] = {nome = "troll", storage = 30000, amount = 20, exp = 5000, pointsTask = {1, 1}, items = {{id = 2157, count =...
  18. pasiak12

    check vocation on grass

    Use action ID if you want to have more than 1 tiles with that script. With unique ID you can only set it to single one (Or copy paste the script for every unique id you have)
  19. pasiak12

    check vocation on grass

    Better add simple action id to the tile youre working on and execute script only on that thing instead of doing it on every grass-tile with that id on the whole map, its really inefficient.
  20. pasiak12

    Problem with walkback movement script

    Put different numbered returns (We need to distinguish them from themselves) and show us the code. Step only once on the chest and present us the result of the console.
Back
Top