Search results

  1. B

    TFS 1.X+ Allow summons to follow players inside PZ

    Hi guys! I am trying to allow the summon of a player follow him inside a protection zone by editing the source but didn't find the place where it checks if the monster still following the player or not. Do you guys know where I should edit? I am using TFS 1.2! Thanks in advance.
  2. B

    How to increase the rendered size of the map on TFS 1.2 + OTClient?

    Hi guys! I am trying to use a different view for OTClient (pressing ctrl + . 2 times) but I am facing some problems related to the size of the map that is rendered. When I change to this view, the client shows the map being rendered while the character moves. I would like to increase the render...
  3. B

    Help with C++ TFS 1.2

    Hi guys! I am trying to chance the monster.cpp function bool Monster::selectTarget(Creature* creature) and I must know if the creature is a player and has at least one summon. How can I do that? It is something like this: if (creature->getPlayer() && creature->getPlayer()->...) { What...
  4. B

    Help debug tfs 1.2 crash

    Hi all! I started a tfs 1.2 server and got a crash related to moveEvent but I am not sure from where it came from. is it possible to debug in a way that I can see which script was running just before the crash or something like that? What do you guys recommend me to do in order to find it out? I...
  5. B

    Help with paralyze spell in area

    Hey there, I am trying to implement a spell that paralyzes monsters in a certain range. This is what I have so far: local condition = Condition(CONDITION_ATTRIBUTES) condition:setParameter(CONDITION_PARAM_TICKS, 4000) condition:setParameter(CONDITION_PARAM_SPEED, 50) local combat = Combat()...
  6. B

    How to send a tutorial to new players on TFS 1.2

    Hi all! I want that when the player log in for the first time he receives a tutorial about how to play the game. I found out the function player:sendTutorial(tutorialId). Is this what I am thinking about? I know it is possible to send a text box or something but I would like something better...
  7. B

    TFS 1.X+ New slot not saving items (TFS 1.2)

    I've created a new slot that is working properly (I can put items marked with xml tag slotType value "order" on it) but when I logout id doesn't save the item I put there. I will put down the code I inserted on tfs sources and on otclient lua scripts. I will appreciate if you help me figure out...
  8. B

    C++ Help with my c++ function creature:doCreatureCastSpell() TFS 1.2

    Hi friends! I am working in a function that makes monsters cast spells in lua environment. The current version (below) is working but I cannot control the damage that it deals. I am trying to do as normal monsters does (use min and max values to calculate the damage) but I was not able. int...
  9. B

    Help with c++ change in MonsterType:getAttackList() TFS 1.2

    Hello friends! I am working in a system that needs to get the name of the attacks from monster xml. I found out in luascript.cpp the correspondent function but it does not have the option to return the name: int LuaScriptInterface::luaMonsterTypeGetAttackList(lua_State* L) { //...
  10. B

    Make monsters cast spells when player talk to it (TFS 1.2)

    I am working on a script that when a player talk something close to a monster it casts a spell to damage that player. I've checked the spells.xml and in monster spells I've found for example: <instant name="djinn electrify" words="###2" aggressive="1" blockwalls="1" needtarget="1" needlearn="1"...
  11. B

    Fly System TFS 1.2 question

    I am trying to make my own fly system for TFS 1.2 and I am not sure about how to create a new tile in destPos while moving (onStepOut movement) With onSay I can create a tile upstairs: function onSay(player, words, param) if player:getStorageValue(storageFly) ~= 1 then return false end...
  12. B

    Lua Help: Don't allow to carry more than certain amount of an item

    Hi! I want to create a script that does not allow a player carry more than, let's say 3 items of id 100. I did this on player events: function Player:onMoveItem(item, count, fromPosition, toPosition, fromCylinder, toCylinder) print("onMoveItem") if not item.getId() == 100 then return...
  13. B

    put delay on player:teleportTo(toPosition)

    Hi Is it possible to define delay for functions? For instance if I want to teleport a player after 3 seconds how would I do it? I appreciate any kind of help!
  14. B

    Change animation on combat according to weapon

    Hey there! As the title says I want to change the animation displayed on combat according to weapon and also does not show any animation when on fist. Do you guys know the best way of doing that? Thanks!
  15. B

    Question about monster:remove()

    Hey there! I am working in a new system in which I want to create summons for players and then at some point I want to remove these summons. To create summons I am using local monster = Game.createMonster(name, playerPos) if monster ~= nil then monster:setMaster(player) end The point...
  16. B

    AddHealth() with no animation

    Hey there! Is it possible to cast lua command monster:addHealth() with no animation at all? I appreciate any kind of help!
  17. B

    How to increase strength of summons

    Hi all! I am trying to increase the strength of monsters that players summon on TFS 1.2. I want they stronger than normal spawned monsters (more attack damage and defense). I know it is possible to create new xml for these monsters but I wanna do directly on the script. To summon monsters I am...