• 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.X Bounty Hunter System

@imkingran

Greets,
Being so fast with the new talkaction was realy impressive, well done, I didn't want to post until I had a fair chance to try it fully.

Im currently using TFS 1.1 and will be updating to 1.2 shortly when basicly everything is working correctly on the server in it's current state, almost done.

Current Issues:

1. Error when in logg when adding a new Bounty.
I Believe it's only the broadcast part.
Code:
Lua Script Error: [TalkAction Interface]
data/talkactions/scripts/BountyHunterAdd.lua:onSay
data/talkactions/scripts/BountyHunterAdd.lua:45: attempt to index global 'player
' (a nil value)
stack traceback:
  [C]: in function '__index'
  data/talkactions/scripts/BountyHunterAdd.lua:45: in function <data/talka
ctions/scripts/BountyHunterAdd.lua:1>

2. When killing someone with the Bounty added I get no reward.
(Money is drawn from adding)

3. The new talkaction window comes up but without any names.

Was this mainly made for 1.2? Might be Worth to wait until I upgraded Before I put to much effort into fixing it?

It's a great script in general, just have to figure this out. :)

Kind Regards,
Eldin.

PS: Another cool idea is to make the entire Bounty add an NPC, I would definitely put the NPC in a dark bar!
 
Code:
function onSay(cid, words, param) -- 1.0


function onSay(player, words, param) -- 1.1+

make 1.0 compatible with 1.1+
local player = Player(cid)
Edit:
That isn't the only thing that might need to be done to make 1.0 compatible with 1.1+
 
Last edited:
That was just stupid from my side, thank you Codex.

I'll let my embarrasing text be if someone else have the same "problem". :oops:

Kind Regards,
Eldin.
 
So I'm having a similar problem , right works , until the time I kill the player , there comes the reward , and will not appear any more , would have to take a stand ?
 
I'm having a problem.
If someone say the words but use the wrong player name, the function take the money and create a hunt in the website page.
But the player even no exist. And in this case they can add infinite bounties with wrong player names.
And the same occurs when someone say !hunt [prize], playername with space before playername.
It takes the money and create a fake Bounty in website.
Some fix for that?
 
Last edited:
@imkingran what do I have to change to make it work with tfs 1.2? If im using this script it adds also names that don't exist and when a player gets killed the killer doesn't get anything and the killed one stays on the list
 
@Oualid

Hey man I just got back home from a long trip. I'll set up a TFS 1.2 environment tomorrow and update the main page. I may even re-do it since this thread was posted at a time where I was very nooby/new to the OT world, I'm still a noob but a little less, so I 'll try to make it a lot neater and add in more configurable options.

If there's anything you'd like to see added that's not currently part of the original system let know! :)
 
@Oualid

Hey man I just got back home from a long trip. I'll set up a TFS 1.2 environment tomorrow and update the main page. I may even re-do it since this thread was posted at a time where I was very nooby/new to the OT world, I'm still a noob but a little less, so I 'll try to make it a lot neater and add in more configurable options.

If there's anything you'd like to see added that's not currently part of the original system let know! :)
Thanks! As far as I know nothing has to be added :p
 
Thanks! As far as I know nothing has to be added :p

Hey I actually didn't test it on TFS 1.2 but I updated the script on the main page and fixed the issue I think you guys were having with the fake names. The database is different now so make sure you install the new table as well!

Let me know if you get any problems while using it since I really wasn't able to test it very thoroughly but I didn't encounter any errors in my brief session on TFS 1.1! :S
 
Hey I actually didn't test it on TFS 1.2 but I updated the script on the main page and fixed the issue I think you guys were having with the fake names. The database is different now so make sure you install the new table as well!

Let me know if you get any problems while using it since I really wasn't able to test it very thoroughly but I didn't encounter any errors in my brief session on TFS 1.1! :S
Awesome! Is the other problem also fixed? That when I kill the hunter im not getting any reward and that it shows that he's still alive? Im going to test it later today!
 
Hey I actually didn't test it on TFS 1.2 but I updated the script on the main page and fixed the issue I think you guys were having with the fake names. The database is different now so make sure you install the new table as well!

Let me know if you get any problems while using it since I really wasn't able to test it very thoroughly but I didn't encounter any errors in my brief session on TFS 1.1! :S
Was just testing it now and both problems have been fixed but there is a new problem xd
If you put a bounty on someone everything works except that there won't be any money removed from your balance but the bounty gets through so the money kinda gets cloned when you kill the guy yourself :p
 
Was just testing it now and both problems have been fixed but there is a new problem xd
If you put a bounty on someone everything works except that there won't be any money removed from your balance but the bounty gets through so the money kinda gets cloned when you kill the guy yourself :p

Oops, nice find, you're the lab rat in this operation! :p

Change:
Code:
                    if player:getBankBalance() >= amount then
                        return true
                    end
To:
Code:
                    if player:getBankBalance() >= amount then
                        return player:setBankBalance(player:getBankBalance() - amount)
                    end

I see some other errors with putting more points then you have as well. Going to fix that in a second!

Here is the full changelog, you can either re-copy the library file or use quickdiff.com or WinMerge to compare and see what's changed.

  • Fixed not removing Bank Balance
  • Fixed not checking Premium Points balance before removing. (Was putting into negative values)
  • No longer able to place bounty on self
  • Added option in config to check for ips (add ipCheck = true/false to your config or re-copy library)
 
Last edited:
Oops, nice find, you're the lab rat in this operation! :p

Change:
Code:
                    if player:getBankBalance() >= amount then
                        return true
                    end
To:
Code:
                    if player:getBankBalance() >= amount then
                        return player:setBankBalance(player:getBankBalance() - amount)
                    end

I see some other errors with putting more points then you have as well. Going to fix that in a second!

Here is the full changelog, you can either re-copy the library file or use quickdiff.com or WinMerge to compare and see what's changed.

I've tested it and everything seems to work now! I did not test it with premium points tho since I haven't added premium points to my server yet. Also the other currency I will have to test to later today. But so far with gold everything seems to work perfectly! Thanks :)
 
There is a lua script inside the database quotation that should NOT be there. It's a bit messy. I dont know where it should be either.
 
9PNaA

https://imgur.com/a/9PNaA
help??
 
Back
Top