• 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!
  • 2026 staff recruitment is open! Check it out and consider applying!

Search results

  1. R

    C++ how to give "array -1" a value

    perfect! I had to do a quick study because I never used ? before, but I think I understand it now. if i > 0 i, else 0 right?
  2. R

    C++ how to give "array -1" a value

    but the problem is that for i == 0, i-1 does not exist, and when I call i -1 (or test[-1]) it will receive a random value right?
  3. R

    C++ how to give "array -1" a value

    Simple question, I have this: double percentMax[4] = {0.25, 0.40, 0.80, 1.50}; and I want to make a uniform_random(x, y) where: x = percentMax[i-1] y = percentMax[ii] <- I put double i here otherwise the forum would interpret it as italic but If my i = 0, there is no i = -1 since 0 is the...
  4. R

    AAC Changing "localhost" domain

    My question is a little stupid but I couldn't find any tutorials on how to do this... I can fully use the AAC I downloaded (myaac v.0.2.3), and my ot server already has an ip (xxxxx.servegame.com). However I can only access my website via localhost, so that means only I can access it. How can I...
  5. R

    C++ cmath or not? (TFS 1.2)

    Cool, thanks!
  6. R

    C++ cmath or not? (TFS 1.2)

    Is this library included in the tfs 1.2 source? I ask because I need to use a round function... If this library is not included, then what kind of function can I use to round values to the nearest integer?
  7. R

    C++ rand()% function

    dude you are a lifesaver haha, if I win the lottery one day I will remember you, seriously you already answered like 10 questions I had thanks!
  8. R

    C++ rand()% function

    EDIT: To generate random values use the uniform_random function in tools.h (remember to include it in the code you are working on) As some of you may know, the rand()% function in c++ is not truly random. It repeats values and to change this you need to include time.h and srand(time(0));, but...
  9. R

    [MyAAC][Plugin][Template] darkritual

    For some reason it said "the file you are trying to upload is not a .zip file" But it is lol
  10. R

    C++ need help with some "get" functions in C++ (TFS 1.2)

    Yeah, I'll probably do it in lua haha, thanks!
  11. R

    C++ need help with some "get" functions in C++ (TFS 1.2)

    EDIT: Forgot to explain the "get" functions I want lol. Every time a new item is created it has random stats, it doesn't matter if it is via /i command, monster drops, quests, trade or etc... So would it be possible to get the origin square of the item (the chest if it is a quest, the monster if...
  12. R

    Exevo gran mas pox (same dmg to players and monsters)

    I have an idea, if you don't understand just tell me and I will write the script for you. Create two combats instead of only one. On the first one you use min and max values with onGetFormulaValues, and on the second combat you use 2*min 2*max. Then INSIDE the onCastSpell you return doCombat...
  13. R

    Help to Change Tibia client name...

    you made an otclient but it is named tibia.exe? dude you can literally rename the client in your folder by just clicking with your right mouse button on tibia.exe and renaming it to Myotserver.exe, and then you create the installer with this .exe... everyone that installs the client will see...
  14. R

    Exevo gran mas pox (same dmg to players and monsters)

    Are you sure 'target' is the right syntax for this? Try cidEx, I think i've seen it somewhere, but you are probably right about being unable to access target outside of onCast
  15. R

    C++ Sending floating text via source

    With the help of xeraphus I managed to get a code where items have x chance to be created with extra stats. However sometimes this chance can be pretty low, and it would suck for players lool at each item they drop in search of enhanced items. Is there any way I could send a magic effect to the...
  16. R

    C++ "readXML" on TFS 1.2

    what if I wanted to use subnodes? Instead of doing this: <attribute key="attackmax" value="11" /> <attribute key="attackmaxchance" value="20" /> I wanted to do this: <attribute key="attackmax" value="11" chance="20"/> I would have to edit the pugixml thing right? Because the only "nodes"...
  17. R

    C++ "readXML" on TFS 1.2

    I am recompiling now to check, but I really think it will work because the extra defense is declared as extraDef, with a capital D, but in the tmpStrValue it is used as extradef lol
  18. R

    C++ "readXML" on TFS 1.2

    Oh dude, I am so pissed at myself right know, I spent like 3 hours wondering was I was doing wrong and it was literally ONE CAPITAL LETTER? HAHA Thank you so much, I am going to test it right now!
  19. R

    C++ "readXML" on TFS 1.2

    So basically I want the item to get a bonus attack based on a random value between 0 and the "attackMax" value. When I compile the server, I get no errors, but when I execute the server I get a warning: [Warning - Items::parseItemNode] Unknown key value: attackMax
Back
Top