- Joined
- Dec 9, 2010
- Messages
- 143
- Solutions
- 1
- Reaction score
- 66
I'm thinking of making a sci-fi/mecha/robots custom server and I'm looking for guidance since I'm kinda struggling with a few points, kinda getting the hang of the code flow.
Here's my line of tought:
- Robots are mounts -> Change mount change robots -> by changing a robot, change player vocation, appearance out of PZ (techinically mounted)
Issues:
What I tought could be a solution:
- Use or equip an item that:
--- sets a storageValue for the selected mount storage value (already exists)
--- do the stuff it has to do
--- then force mount a player when leaving PZ.
- Use or equip an item that:
--- sets a storageValue specifically for this, not related to Tibia mount
--- do the stuff it has to do
--- stores looktypes of "mounted" and have another one store for "not mounted" and change player appearance when entering or leaving PZ
--- not using the
method and altering player outfit directly seems a better option for login/logoff purposes.
With all that said, comes the real question that is in the title, how/when can I detect that player has gotten the condition "In protection zone"? I dont think checking every step would be ideal. And then can I force mount from lua the same way OTC does calling player:toggleMount ?
Edit: I've been searching for this stuff for days... but right after I posted it I found the SWIMMING examples. I guess I'll just make a new tile item for the cities and have the functions stepIn/stepOut to turn players back to their human outfits.
Here's my line of tought:
- Robots are mounts -> Change mount change robots -> by changing a robot, change player vocation, appearance out of PZ (techinically mounted)
Issues:
- I could NOT compile TFS (another difficulty that I feel i'll have to deal with eventually) so I'm trying to make everything work using only lua scripts.
- Mounting is not in lua script, I believe OTC is calling "
" directly to c++C++:
toggleMount - I cant intercept the toggleMount to do stuff before or after
What I tought could be a solution:
- Use or equip an item that:
--- sets a storageValue for the selected mount storage value (already exists)
--- do the stuff it has to do
--- then force mount a player when leaving PZ.
- Use or equip an item that:
--- sets a storageValue specifically for this, not related to Tibia mount
--- do the stuff it has to do
--- stores looktypes of "mounted" and have another one store for "not mounted" and change player appearance when entering or leaving PZ
--- not using the
LUA:
doCreatureSetOutfit
With all that said, comes the real question that is in the title, how/when can I detect that player has gotten the condition "In protection zone"? I dont think checking every step would be ideal. And then can I force mount from lua the same way OTC does calling player:toggleMount ?
Edit: I've been searching for this stuff for days... but right after I posted it I found the SWIMMING examples. I guess I'll just make a new tile item for the cities and have the functions stepIn/stepOut to turn players back to their human outfits.
Last edited: