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
vendor system not transfering to bank
Author Message
babazar
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 10 in 9 posts
Joined: Jun 2013
Reputation: 0



Post: #1
vendor system not transfering to bank
little snippet of our vendor system, its not sending bought items to a bank or even bag pack

on=1
If (<distance> > 5)
src.sysmessage <def.toofar>
findid.i_m_vendorfala.remove
return 1
endif
If !(<tag0.itemsavenda>)
src.sysmessage <def.noitems_forsale>
sdialog d_vendor_owner_pod
return 1
endif
local.lastp=<src.p>
local.flags=<src.region.flags>
src.region.flags=0
src.p 1,1
serv.newitem=i_backpack
new.name=Vendor Bag
new.color=39
new.cont=<src.findlayer.29>
f_retirar_items <new>
tag.itemsavenda=0
src.sysmessage <def.items_banked1>
findid.i_m_vendorfala.remove
src.p=<local.lastp>
src.region.flags=<local.flags>
src.update


[function f_retirar_items]
IF (<tag0.itemsavenda>)
local.itotais=<tag.itemsavenda>
local.item=1
FOR <local.itotais>
try uid.<tag.iuid<eval <local.item>>>.tag.dispid2=
try uid.<tag.iuid<eval <local.item>>>.cont=<hval <argn1>>
try tag.iuid<eval <local.item>>
try tag.desc<eval <local.item>>
try tag.preco<eval <local.item>>
local.item += 1
ENDFOR
ENDIF

I can post there serveral hundard lines, but it will prob boar you.
12-12-2013 09:03 AM
Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #2
RE: vendor system not transfering to bank
So you want to send vendor's backpack to owner bank box right ?
I like to show you how to send items from vendor to owner like below. Cant actually look at your script in order not to cause any miss understanding. You can just implement what i will mention to your script easily, i would say.

It is simple like the following.

Just reffered to uid of vendor's backpack ;

ref1= <findlayer.layer_pack.uid> // thinking that uid is the vendor. You can easily satisfy this by any function you gonna create.
// So if you assign any tag to vendor to remember who is owner , that would be helpful like, consider we have tag like tag.owner_vendor = <src.uid> thinking that src is the owner. You can add this while creation of vendor. Once its establish, vendor knows who is master. Or you can just refer to memorytype i guess. Its your choice.

ref2= <tag.owner_vendor>
ref1.cont = <ref2.findlayer.layer_bankbox.uid> // instead of this you can easily assign ref3 as ref3=<ref2.findlayer.layer_bankbox.uid>

So this will transfer vendor's backpack to owner's bank box.

If you want to just send items one by one you can do the following ;

forcont <ref1> 0 // 0 will count anything in the backpack
cont <ref3>
endfor

Hope, this will help.
(This post was last modified: 12-13-2013 12:20 AM by Avatar.)
12-13-2013 12:10 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
babazar
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 10 in 9 posts
Joined: Jun 2013
Reputation: 0



Post: #3
RE: vendor system not transfering to bank
Sorry this is part of our player vendor system.. It's supposed to transfer a sold item to the buyers bank box
12-13-2013 01:08 AM
Find all posts by this user Like Post Quote this message in a reply
Avatar
Journeyman
*

Posts: 172
Likes Given: 6
Likes Received: 27 in 12 posts
Joined: Apr 2012
Reputation: 5

The North Shield

Post: #4
RE: vendor system not transfering to bank
Does not matter, just referred to item as ref1 = <item uid> then as i said, cont it via ref2 which can be player like ref2 = <player uid>
ref1 = <argo.uid> // for instance if you are targeting an item ? or whatever it is just configure this,
ref2 = <src.uid> or whoever it is.

ref1.cont <ref2.findlayer.layer_box.uid>

I'm just showing you the logic, not the whole scripting issue. Because it wont help you later. I can implement my knowledge to your scripting but this will not make you better. Just make a bit brain storming on it. Try to understand what i'm telling you.
(This post was last modified: 12-13-2013 01:28 AM by Avatar.)
12-13-2013 01:23 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
babazar
Journeyman
*

Posts: 189
Likes Given: 2
Likes Received: 10 in 9 posts
Joined: Jun 2013
Reputation: 0



Post: #5
RE: vendor system not transfering to bank
sorted the issue thanks Big Grin
12-13-2013 07:05 AM
Find all posts by this user Like Post Quote this message in a reply
Post Reply 


Forum Jump:


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