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-nmm6 (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-nmm6 (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-nmm6 (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
Trade Window packet problems (Secure Trade)
Author Message
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #1
Trade Window packet problems (Secure Trade)
Code:
[FUNCTION TradeWindow]
REF3=<ARGS>
FOR 2
  SERV.NEWITEM i_bulletin_board
  NEW.TYPE t_eq_trade_window
  REF<LOCAL._FOR>=<NEW>
ENDFOR
REF1.LINK=<REF2>
REF2.LINK=<REF1>
IF (<REF3>)
  REF3.CONT=<REF1>
ENDIF
SRC.EQUIP <REF1>
EQUIP <REF2>
SRC.SENDPACKET 06F W02F 00 D<UID> D<REF1> D<REF2> 01 <ASCPAD 30,<NAME>>
SENDPACKET 06F W02F 00 D<SRC> D<REF2> D<REF1> 01 <ASCPAD 30,<SRC.NAME>>
usage:
-TradeWindow (just open an empty trade)
-TradeWindow <item uid> (to open a window trading this item)

the problem is, this function used to work fine until some time ago. Suddenly stop working after some sphere builds update, I dont know why

opening the empty trade window will works fine, but if the script tries to open the trade window with some item it will open a "empty" window where the item exists but its not shown

Comparing to the packet guide http://docs.polserver.com/packets/index.php?Packet=0x6F everything is fine (I think). So someone know whats wrong? Any sphere developer could check if the packet match the sphere internal trade window packet plz?
(This post was last modified: 07-28-2013 09:31 AM by Coruja.)
07-28-2013 09:31 AM
Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #2
RE: Trade Window packet problems (Secure Trade)
Possible issue with EF_FixCanSeeInClosedConts maybe?

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
07-28-2013 11:52 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #3
RE: Trade Window packet problems (Secure Trade)
coruja, if i may ask

why have you scripted a secure trade, is there something insecure about the default setup that i need to know about?

[Image: matts_siggy.gif]
07-28-2013 03:59 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #4
RE: Trade Window packet problems (Secure Trade)
(07-28-2013 11:52 AM)Ben Wrote:  Possible issue with EF_FixCanSeeInClosedConts maybe?
it makes sense, but doesnt work :/
probably theres something wrong just on the packet, maybe a missing byte or letter. Because items are placed fine inside the "container" and the trade behavior works fine too. It only doesnt show the first item that started the trade, but the item exists on trade container and placing more items manually works fine without any problems


(07-28-2013 03:59 PM)Rattlehead Wrote:  coruja, if i may ask

why have you scripted a secure trade, is there something insecure about the default setup that i need to know about?
I doesnt use this function to override the default trade window, lol Big Grin
I'm using it to create the trade window on some situations like pet transfer or house transfer using OSI style (trade window), like this
07-28-2013 05:41 PM
Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #5
RE: Trade Window packet problems (Secure Trade)
ok, ic now, this seems it would be easier to script without sending packets tho

have the house sign make u a scripted deed, and remove all owners

make this deed @dclick make src the new owner of the house

if the trade is good, the new owner simply dclicks the deed, and the house becomes his, if original owner doesnt agree to the trade, then he can dclick the deed and now he owns the house

pets can be shrunk and traded

just seems like alot of work for something so simple to me, unless there are things i am not taking into account of course

[Image: matts_siggy.gif]
07-28-2013 06:38 PM
Find all posts by this user Like Post Quote this message in a reply
Coruja
Sphere Developer
*****

Posts: 987
Likes Given: 5
Likes Received: 226 in 187 posts
Joined: Jul 2012
Reputation: 7

Dimension Shard

Post: #6
RE: Trade Window packet problems (Secure Trade)
on my last try before go sleep, I placed a item manually inside the "container" (t_eq_trade_window) using CONT=123456. And the magic works, the item goes to the trade window too. So I just changed "REF3.CONT=<REF1>" to the last line and now the problem is fixed. I dont know if the packet is correct or not, but its working and thats enough lol
07-28-2013 07:09 PM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #7
RE: Trade Window packet problems (Secure Trade)
I just added a transfer ownership function honestly, doesn't clear the lists, since that could cause a headache if the new owner needs the current friend's e.t.c.. to still have access. Nothing the new owner can't do with a single click on the sign

[Image: 2nis46r.jpg]
07-28-2013 10:42 PM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Ben
Sphere Developer
*****

Posts: 612
Likes Given: 2
Likes Received: 123 in 70 posts
Joined: Mar 2010
Reputation: 18

SphereCommunity

Post: #8
RE: Trade Window packet problems (Secure Trade)
so it's possible that the trade window needs to be equiped before any items be added?

[Edit]
Just looked at the source, and it basically does what you did...
-Create the trade windows
-Link them to one another
-Equip them
-Send the packet
-Add item that was droped on the char

So t looks like items have to be added after the trade window is established by the client Smile

AxisII's current version: 2.0.4j
AxisII SourceCode on Github
AxisII up to date changelog
(This post was last modified: 07-29-2013 12:58 AM by Ben.)
07-29-2013 12:49 AM
Visit this user's website Find all posts by this user Like Post Quote this message in a reply
Rattlehead
Master
**

Posts: 290
Likes Given: 3
Likes Received: 8 in 6 posts
Joined: Jun 2012
Reputation: 8



Post: #9
RE: Trade Window packet problems (Secure Trade)
@mourdaunt

transferring ownership isnt quite the same, as you dont have a trade window up, so i assume coruja is trying to keep them from getting scammed, like say you transfer ownership then the person doesnt give u the items he promised for it, or vice versa, u give items for a house, the owner doesnt transfer ownership. the way hes doing it, there is a viable item for the trade window ensuring that there is a fair and secure trade, rather than relying on trusting someone you may not know.

[Image: matts_siggy.gif]
07-29-2013 04:09 AM
Find all posts by this user Like Post Quote this message in a reply
Mordaunt
Super Moderator
****

Posts: 1,237
Likes Given: 26
Likes Received: 55 in 43 posts
Joined: Mar 2012
Reputation: 35



Post: #10
RE: Trade Window packet problems (Secure Trade)
oh yeah I see what your saying, I'm just saying I couldn't be chewed on with it, so I have the transfer thing, also if you don't trust the person to give you what you are asking, on mine you can just put the whole house up for sale and the money is deposited in your account as soon as it's bought.

Just different ways of doing it. I always did wonder what the whole secure trade window deal was about when I saw it a long time back, and now I know so there's something Wink

[Image: 2nis46r.jpg]
07-29-2013 06:24 AM
Visit this user's website 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)