ID:168626
 
i was wondering how i would make a send file verb that if you send a file to a mob in world he has to send you one back o you dont get riped off
Even if you succeed in doing so. The person can still send you a false icon. And it is posible :P.
In response to Xeal
Maybe you could do something to restrict the movement of the mob until he sends an icon. For example

mob/var/icon_sent=1

client/Move()
if(usr.icon_sent==0)
return
usr<<"You have to send a return icon before you may move again!"
else
..()

I dont know if this will work, i typed it up fast. But it should(note its completely untested)
In response to Reinhartstar
ya ive alredy got a system that will keep them from moveing but i dont know how to make the secure trade verb
In response to Xeal
ya but i would hope no one that Noobish would do that did there momma ever teach them manners lol
In response to Skaterdudejarrett
You'll never be able to do this. The user could easily logout, shutdown his system, or close the window.

[EDIT]

Unless you delete the file he received at Logout() if he didn't send one back, or, more likely on client/Del().
In response to Audeuro
so guess this idea was a bummer or is there a way to halt logout untill he or she has sent the file in return just wondering if not that would be a good idea for BYOND Version 4.0
In response to Skaterdudejarrett
Skaterdudejarrett wrote:
so guess this idea was a bummer or is there a way to halt logout untill he or she has sent the file in return just wondering if not that would be a good idea for BYOND Version 4.0

That's imposible :(
In response to Audeuro
Audeuro wrote:
You'll never be able to do this. The user could easily logout, shutdown his system, or close the window.


So have each user upload the files to the server and then have the server send the files to each user.

You can allow access to a transfered file for the next hour (to account for any disconnects or whatever).

You can prevent scams by showing previews of the icons in each either with a water mark or a random color mask added to it.
Even if you did do that, I could just send a simple smily face graphic in return and you'd still be ripped off. Secure trading in icon-transfer games is a stupid thing to pursue, as an extension of the icon games themselves being pretty stupid.
forgive me if i understood this wrong but you could make a Trade object in each person, and tey can move things into that trade box and see what is in them, once each person agrees on the trade, each ersonas trade box contents is moved to the other person.
Just make sure that when the character logs in the trade box is checked and things are moved back into the player in case of a logout that may have accured.
This is more theory than actual code, but I think this system will cut down on fraud in your icon trader.

Player 1 initiates a transfer, uploading his icon.

Player 2 gets a popup requesting a trade that shows person offering the trade, the icon name and number of icon_states.

If player 2 accepts the offer, they may upload an icon.

Both players get a popup showing two columns. Each column shows the name of the file being transferred, a single frame snapshot of the default icon_state, a single frame snapshot of one random icon_state (to disuade people from filling an icon with empty icon_states) and either a list of icon_states or the number of icon states in the icon.

Both players have to accept the trade for it to proceed. If one of the players cancels or disconnects, neither player gets the new icon.

Alternately, the preview/accept page could be on the BYOND map, letting you see the animation of the icon and possibly change direction and icon state of the icons to be sure you're getting quality work. I'd advise against it though, since unscrupulous people could just screenshot all frames, icon_states, and directions.