Request for a script for giveaways

blue

Member
My birthday is coming soon and I have like thousands of clovers, surprise eggs and booze to give away.
I re-edited everything in the second post...
Thank You very much!
And I am sorry for the low price. I am sure I will get more and send You more it's just that that is the lowest I will give...
 
Last edited:

blue

Member
Okay now I will be offering a MR. ACCESSORY to the person who can make this script and will do it as following:
- It should respond to 1-meat trades with DB-made booze (I kind of forgot
- It should respond to 2-meat trades with hi meins
- It should respond to 3-meat trades with twinkly wads
- It should respond to 4-meat trades with clovers
I should have the ability (And please explain exactly how) to change how many of each is offered in a trade: For example I should be able to decide if I give away 3 DB-drinks or 30 to each trade.
Also once a person proposed one kind of a trade (for example he proposed a 1-meat trade allready today) he should not be able to propose a 1-meat trade again untill rollover, but should still be able to propose trade with the others: but once he proposes one trade with 2 meat for example that day he shouldn't be able to propose another one of those neither until rollover!

Thank You very much and please HURRY!
 

zarqon

Well-known member
Here you go Blue! Hope this is in time for your birthday.

This will respond to trades once every minute, declining trades with the same amount of meat in the same day, and responding to other trades with 1-4 meat as you specified above. The item amounts are currently set at 1, but that is easy to change at the top of the script. You might also want to change the message that gets sent along with your trade (also at the top).

There were a few things I was unclear about:

1) Do you want to send both advanced and super-advanced DB drinks? This one only sends super-advanced drinks.
2) What do you want it to do if you are out of a certain item? Currently I have it just skip the trade.

If you'd like either of those handled differently, let me know.

This will create a data file called tradeawaydata.txt in your scripts directory, which you can safely move to your data directory.
 
Last edited:

blue

Member
Thank You very much! I'll be sending the Mr. A when i get home!
And yes it would be pretty good if it would offer superhuman too. I am thinking of offering 5-10 drinks to each person... and 2 days ina row that would mean like 2-3k people... a bit too expensive...
And if I'm out of something can it buy them? If it's not possible it's OK
 

zarqon

Well-known member
Okay, I've updated my previous post. The new version will send any DB drinks (both advanced and superhuman), and will attempt to buy more items if you are out of them, but only if you have "buy from the mall" checked in preferences. Everything else works as before.

And now, a minor complaint directed at no one in particular:

What is the deal with advanced cocktails having noncontiguous item numbers?? Totally skanked up my algorithm. Seriously.
 

blue

Member
Okay It'll take one more day for the bank of kol to give me the meat back in order to buy the Mr. A... Also it seems like it has some problems... it denies all the 1 meat and 2 meat trades
 

zarqon

Well-known member
It's probably denying them because you already offered that trade today. The same person cannot offer more than one of the same trade in a day (even if you restart mafia, it will remember -- that's what the tradeawaydata.txt file is for). If you're only testing it out, delete the tradeawaydata.txt file and it will respond to the trades again (once per person per day).
 

blue

Member
No it's not that... I tested it myself and that's not the problem... it's beacuse I'm out of cold hi meins and neuromancers and it can't find any in my inventory anymore... I have like 2k other kinds of hi meins and 5k other kinds of booze... but it can't find them... the first script did that taught...
 

zarqon

Well-known member
Okay... I didn't have time to test this (it's very late in Korea now) but here's a version with a different approach to choosing which drink to send, and it specifically tries to buy items you lack rather than using retrieve_item(). Let me know if this fixes it.
 
Last edited:

blue

Member
> call scripts\Giveawayz\tradeaway.ash

Parsing trades...
You have 9 incoming trades.
Processing trade 2183477: 2 meat from yueli7...
Offering yueli7 3 spooky hi mein...
There was a problem processing the trade.
Processing trade 2183479: 4 meat from Blasmeister...
Offering Blasmeister 25 disassembled clover...
Processing trade 2183480: 2 meat from Tiny Plastic MikeMar...
Offering Tiny Plastic MikeMar 3 spooky hi mein...
There was a problem processing the trade.
Processing trade 2183481: 1 meat from LordDragon...
Offering LordDragon 5 mandarina colada...
There was a problem processing the trade.
Processing trade 2183482: 2 meat from LordDragon...
Offering LordDragon 3 spooky hi mein...
There was a problem processing the trade.
Processing trade 2183483: 1 meat from yueli7...
Offering yueli7 5 mandarina colada...
There was a problem processing the trade.
Processing trade 2183484: 3 meat from LordDragon...
Offering LordDragon 15 twinkly wad...
Processing trade 2183485: 1 meat from cyber cat2...
Offering cyber cat2 5 mandarina colada...
There was a problem processing the trade.
Processing trade 2183486: 4 meat from LordDragon...
Offering LordDragon 25 disassembled clover...
Countdown: 1 minute...


Sorry it doesen't... And It's not beacuse of the list...
 

zarqon

Well-known member
A few more tweaks. This version works fine for me...

Parsing trades...
You have 3 incoming trades.
Processing trade 2183507: 1 meat from Zarqon...
Offering Zarqon 5 ducha de oro...
...response sent.
Processing trade 2183508: 2 meat from Zarqon...
Offering Zarqon 5 cold hi mein...
...response sent.
Processing trade 2183509: 4 meat from Zarqon...
Offering Zarqon 1 disassembled clover...
...response sent.
Countdown: 1 minute...
 

Attachments

  • tradeaway.ash
    5.3 KB · Views: 52

blue

Member
Okay I found a new bug... sorry for that... also it seems like the bank hasn't read my withdrawl message.
It looks like the bot doesen't buy things from the mall... it thinks it responds to trades but doesen't... then after 1 minute it declines the trades beacuse it actually thinks that it responded to the same amount of meat...
 

zarqon

Well-known member
Odd (and unfortunate) that it would work fine for me and not for you.

I've just gotten home from work and had a chance to take a look at it again. Since I can't create the problem you're having myself, here's a "debug version." Run this version and then either post the CLI output here or PM it to me. That might give me some clues as to what's causing the problem. Again, it worked fine for me:

Parsing trades...
You have 1 incoming trades.
Processing trade 2184927: 2 meat from Zarqon...
Initial item selection: cold hi mein
Item amount: 5
2 cold hi mein is more than 0 none...
Final item selection: cold hi mein (2 in inventory)
Offering 5 cold hi mein to Zarqon...
Searching for "cold hi mein"...
Purchasing cold hi mein (3 @ 5,395)...
You acquire cold hi mein (3)
Purchases complete.
Visiting counteroffer.php?action=counter&whichoffer=2184927&pwd&howmany1=5&whichitem1=1593&memo2=Happy birthday to me!
...response sent.
Countdown: 1 minute...

Don't bother sending the Mr. A unless I actually get you a functional script! Sorry it didn't work right "out of the box."
 

Attachments

  • tradeaway.ash
    5.9 KB · Views: 48

codster62

Member
Well thanks to zarquon, I also gave alot more to give, so I will be using this script soon. :) Thanks, and Blue, tell me if this is working for you so I may use it.
 

zarqon

Well-known member
I never heard anything from blue about whether this script worked or not. I put a good bit of effort into this, and every version of the script that I posted worked fine for me. By now I have assumed that blue's promised reward will never arrive. I will not be writing any further scripts for blue.
 

codster62

Member
Anyways, I need to know how to change the script to add more items for giveaways and modify the default ones in the script. I have not taken a good look at the script yet, but I do not know advanced scripting which is what you use, so I would not do to good editing it. :)
 

codster62

Member
Ok, I have downloaded the script, and am using it. Works fine for me. I might give you a gift later since Blue has not responded. :p
 
Top