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

[TFS 1.2] Pet system

Any help on the call/dismiss pet? I think it has to be done order to be able to use this code. Reloging into the game to call your pet its not an option! >.<
 
pet name can be stored as bytes
let's say 32 letters, 4 letters per storage
8 storages to store whole name

example storage values:
key : 9511
...
key : 9518
value 0-99999999

Pet id
name part

Let's say you want to convert word "Example pet name" (2 letters per storage example)
to avoid going above number 99 you can get rid of first 32 characters of ascii table and store characters like that:
Code:
k:byte() - 32
this way space = 0, ! = 1, " = 2, ... (see http://www.asciitable.com/ for reference)

if player input byte is > 99 then some kind of error or whatever

to decode use strings like that:
if n < 10 then "0"..n
and then tonumber(outcome)
storages should vary between 0 and 9999
so decoding should be like:
<= 999 - convert to string and add "0"
<= 9 - convert to string and add "000"
split: tostring((tonumber(first 2 numbers) + 32)):char()
same with last 2 numbers and you get 2 decoded letters
 
Last edited:
pet name can be stored as bytes
let's say 32 letters, 4 letters per storage
8 storages to store whole name

example storage values:
key : 9511
...
key : 9518
value 0-99999999

Pet id
name part

Let's say you want to convert word "Example pet name" (2 letters per storage example)
to avoid going above number 99 you can get rid of first 32 characters of ascii table and store characters like that:
Code:
k:byte() - 32
this way space = 0, ! = 1, " = 2, ... (see http://www.asciitable.com/ for reference)

if player input byte is > 99 then some kind of error or whatever

to decode use strings like that:
if n < 10 then "0"..n
and then tonumber(outcome)
storages should vary between 0 and 9999
so decoding should be like:
<= 999 - convert to string and add "0"
<= 9 - convert to string and add "000"
split: tostring((tonumber(first 2 numbers) + 32)):char()
same with last 2 numbers and you get 2 decoded letters

Thanks for reply, but at this moment I don't have too much free time, to add this feature. What more I don't have time to make good script description inside first post :S
 
i have this error im use TFS1.2 client 10.90
s7ee1vM.png


and this
4BhAjt-.png
 
You can catch only "wild animals", cat was summon right? If no, then thanks for new bug report.
 
Last edited:
hello the script is nice and work 100%

But how can I other [ 17 ] = {
name = " Dragon Hatchling "
health = 300 ,
evolve = {
to = 18 ,
at = 20
} ,
check = function ( player ) return player : getPremiumDays ( ) > 0 and player : GetLevel ( ) > = 25 and player : isSorcerer () end ,
info = "Only available to Premium Sorcerers above level 25."
for all voc

and how can I add new monster

red need to change or ?



edit--
12:14 [PET-SYSTEM]: Your pet is live!
but the Dragon Hatchling is not comming
 
Last edited:
hello the script is nice and work 100%

But how can I other [ 17 ] = {
name = " Dragon Hatchling "
health = 300 ,
evolve = {
to = 18 ,
at = 20
} ,
check = function ( player ) return player : getPremiumDays ( ) > 0 and player : GetLevel ( ) > = 25 and player : isSorcerer () end ,
info = "Only available to Premium Sorcerers above level 25."
for all voc

and how can I add new monster

red need to change or ?



edit--
12:14 [PET-SYSTEM]: Your pet is live!
but the Dragon Hatchling is not comming

You need to add new monster same as lion:
Code:
<monster name="PET_Lion" file="pets/lion.xml"/>

And set flag summonable="0" and convinceable="1"
 
Ok, I don't know why, but I've logged in and my pet did not show.
So I closed/open the PET channel - still nothing.
I checked !petinfo and it says: "your pet is offline".

Any help?

This script needs a !callpet talkaction.
 
Ok, I don't know why, but I've logged in and my pet did not show.
So I closed/open the PET channel - still nothing.
I checked !petinfo and it says: "your pet is offline".

Any help?

This script needs a !callpet talkaction.

Strange. Any console errors? TFS version?
Reopen PET channel should summon pet.
You added custom pets or so?
 
Strange. Any console errors? TFS version?
Reopen PET channel should summon pet.
You added custom pets or so?

Strange indeed. TFS 1.2, no console errors. No customization was done, it's a virgin script and it's working fine until the pet doesn't show.
I have to release and catch a new pet...
Strange. Any console errors? TFS version?
Reopen PET channel should summon pet.
You added custom pets or so?
 
Back
Top