Double Click GoldBar/Chests/Buns

noisound

Golden Oldie
Golden Oldie
Jul 23, 2004
1,333
8
145
How do i set it up so i can double click me goldbars/buns/chests for instant gold?


ty
 

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
Right, firstly you need to make a few changes in TBL_STDITEMS. Find your GoldBar, GoldBarBundle and GoldChest and change the following fields:

STD_ITEMS:
Code:
GoldBar:
FLD_STDMODE = 31
FLD_ANICOUNT = 27

GoldBarBundle:
FLD_STDMODE = 31
FLD_ANICOUNT = 28

GoldChest:
FLD_STDMODE = 31
FLD_ANICOUNT = 29

Then you need to add the below to Envir->Market_Def->QFunction-0.txt:
Code:
[@StdModeFunc27]
#IF
checkgold 49000001
#SAY
You cannot Exchange goldbar into money.\
your bankbalance would exceed its limit.\ \
<Cancel/@exit>
#ACT
GIVE GoldBar 1
BREAK
#ELSEACT
give gold 1000000
#ELSESAY
GoldBar was Exchanged into money.\
<Cancel/@exit>

[@StdModeFunc28]
#IF
checkgold 45000001
#SAY
You cannot Exchange goldbar into money.\
your bankbalance would exceed its limit.\ \
<Cancel/@exit>
#ACT
GIVE GoldBarBundle 1
BREAK
#ELSEACT
give gold 5000000
#ELSESAY
GoldBar was Exchanged into money.\
<Cancel/@exit>

[@StdModeFunc29]
#IF
checkgold 40000001
#SAY
You cannot Exchange goldbar into money.\
your bankbalance would exceed its limit.\ \
<Cancel/@exit>
#ACT
GIVE GoldChest 1
BREAK
#ELSEACT
give gold 10000000
#ELSESAY
GoldBar was Exchanged into money.\
<Cancel/@exit>

This script is asuming your bag gold limit is 50m, if it's not all you'll have to do is change the calculations.

p
 
Last edited:
Upvote 0

Killmaster

Legend
Legendary
Golden Oldie
Loyal Member
Nov 13, 2003
3,967
27
294
ρяєα¢нєя;631487 said:
Right, firstly you need to make a few changes in TBL_STDITEMS. Find your GoldBar, GoldBarBundle and GoldChest and change the following fields:

This dude is very helpful.
Very nice to see you helping this community so much.
You can't be new surely lol?
 
Upvote 0

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
This dude is very helpful.
Very nice to see you helping this community so much.
You can't be new surely lol?
I learnt alot about mir servers from a small group of very experienced people. Anything beyond that is self taught, im not new to the files, only to this forum.

p
 
Upvote 0

mStation

Golden Oldie
Golden Oldie
Oct 29, 2003
2,042
69
255
♫♪♫ ♦♥♠♣ ♀♂♀
nice work.. i have something similar to this but for example when u click on the gold chest it asks if u want cash of 2 gold bar bundles and so on..

but nice and quick replies.. (no +1 this time or u will be going up too quickly :) :) )
 
Upvote 0

Perebble

LOMCN Veteran
Veteran
Loyal Member
Apr 11, 2006
791
5
124
www.atomicide.com
That script looks wrong to me.
It hasn't taken anything before this code, unless it's consumed on double click, in which case one of the following is not necessary.

#ACT
GIVE GoldBar 1 - if nothing's disappeared, free gold bar?
BREAK
#ELSEACT
take GoldBar 1 - if it's disappeared already, there's nothing to take or it takes a total of 2 gold bars and gives you 1mill?

I'm guessing it disappears, just seems like there's wrong/useless code in there.
 
Upvote 0

Bon

Legend
Legendary
Jul 29, 2004
6,726
330
300
Kent, UK
yer ur right u dont need the take goldbar bit, mines like this

[@StdModeFunc**]
#IF
checkgold 399000000
#ACT
give GoldBar 1
SENDMSG 6 "You Have Too Much Gold"
break
#ELSEACT
give gold 1000000
break
 
Upvote 0

ρяєα¢нєя

Unstookie Titled
VIP
Aug 19, 2008
444
23
105
You do need the GIVE Goldbar bit, as when the script is run the item disappears. So if they have too much gold to change up the gold bar, the GoldBar still disappears but they recive no gold, so they need to have their GoldBar returned to them.

But your right you don't need the take in there, i'll change it.

p
 
Upvote 0

Dan1el

Dedicated Member
Dedicated Member
Apr 23, 2012
86
0
32
I've just tried to implement this (using Preacher's method, with both his and Bon's script) - I double click the goldbar, bar disappears - gold doesn't increase. Any ideas?

---------- Post added at 02:25 AM ---------- Previous post was at 02:24 AM ----------

I've also just noticed this thread is ancient -.- Silly me. Anyone know how to do this for ruby 2.6?
 
Upvote 0