The following warnings occurred:
Warning [2] Use of undefined constant SAPI_NAME - assumed 'SAPI_NAME' (this will throw an Error in a future version of PHP) - Line: 3388 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3388 errorHandler->error
/showthread.php 116 build_archive_link
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/inc/functions.php 3324 build_forum_breadcrumb
/showthread.php 195 build_forum_breadcrumb
Warning [2] Use of undefined constant IN_ARCHIVE - assumed 'IN_ARCHIVE' (this will throw an Error in a future version of PHP) - Line: 3331 - File: inc/functions.php PHP 7.4.33-nmm7 (Linux)
File Line Function
/inc/functions.php 3331 errorHandler->error
/showthread.php 195 build_forum_breadcrumb






Post Reply 
 
Thread Rating:
  • 0 Votes - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
@Itembuy @Buy @sell @itemsell
Author Message
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #1
@Itembuy @Buy @sell @itemsell
hi,

Is there a way to set the kind of coin the vendor gonna accept??

I got diferent kinds of coins in my server, factions coins...
Is there a way to tell the vendor which one use?
01-16-2016 10:36 PM
Find all posts by this user Like Post Quote this message in a reply
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #2
RE: @Itembuy @Buy @sell @itemsell
Look here: http://wiki.sphere.torfo.org/index.php/@ItemBuy
This trigger fires for each item bought.
01-16-2016 11:32 PM
Find all posts by this user Like Post Quote this message in a reply
[+] 1 user Likes karma's post
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #3
RE: @Itembuy @Buy @sell @itemsell
Yes I saw it but with that terms, its so long to script. Anyway its possible.
Ty for the answer
01-16-2016 11:58 PM
Find all posts by this user Like Post Quote this message in a reply
karma
Moderator
****

Posts: 178
Likes Given: 17
Likes Received: 32 in 29 posts
Joined: Jul 2012
Reputation: 3



Post: #4
RE: @Itembuy @Buy @sell @itemsell
Can't you do something like this?

Code:
ON=@ItemBuy
IF (<isFaction1>)
LOCAL.GOLDTYPE = i_gold_faction1
ELSEIF (<isFaction2>)
LOCAL.GOLDTYPE = i_gold_faction2
ENDIF

IF (!<LOCAL.GOLDTYPE>) //if you aren't in a faction you can choose what to do: accept i_gold, accept every kind of money..
...
ELSEIF (!<RESTEST <LOCAL.TOTALCOST> <LOCAL.GOLDTYPE>>)
ARGO.SAY You don't have the money!
RETURN 1
ELSE
CONSUME <LOCAL.TOTALCOST> <LOCAL.GOLDTYPE>
LOCAL.TOTALCOST = 0
ENDIF

The only problem here is that LOCAL.TOTALCOST, as you can see in the wiki, is read-only, changing it to read-write would solve your problem.
01-17-2016 12:31 AM
Find all posts by this user Like Post Quote this message in a reply
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #5
RE: @Itembuy @Buy @sell @itemsell
I cant do it.

Ur script consume coins twice.
As u said I need to set totalcost at 0.

I can do it anyway but I got to give money to the char when buy, and take back the extra money on@sell. But this cause so many troubles.

Would be nice if this get include in the next build.

Local.totalcost RW on sell or buy.
and if possible (local.goldtype <baseid>)
should be awsome.
I dont know anything about visualbasic xD so i cant do myself.
(This post was last modified: 01-17-2016 01:31 AM by rastrero.)
01-17-2016 01:30 AM
Find all posts by this user Like Post Quote this message in a reply
Kanibal
Master
**

Posts: 255
Likes Given: 6
Likes Received: 30 in 28 posts
Joined: Jun 2012
Reputation: 0



Post: #6
RE: @Itembuy @Buy @sell @itemsell
(01-16-2016 10:36 PM)rastrero Wrote:  hi,

Is there a way to set the kind of coin the vendor gonna accept??

I got diferent kinds of coins in my server, factions coins...
Is there a way to tell the vendor which one use?

Code:
[CHARDEF 0401]
DEFNAME=C_H_VENDOR
NAME=#NAMES_HUMANMALE the Vendor
ID=C_MAN
......

ON=@Create
NEED=i_gold

Grandmaster Localhost Admin
(This post was last modified: 01-17-2016 02:43 AM by Kanibal.)
01-17-2016 02:41 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
rastrero
Master
**

Posts: 250
Likes Given: 41
Likes Received: 28 in 24 posts
Joined: Jan 2016
Reputation: 3



Post: #7
RE: @Itembuy @Buy @sell @itemsell
Are u sure if u put it on need, it gonna works?
I mean?
Do it gonna be the only money a vendor gonna accept for buying or sell?
01-22-2016 01:04 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


User(s) browsing this thread: 2 Guest(s)