Get Item

Results 1 to 14 of 14
  1. #1
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Get Item

    So, I am working on creating an interface similar to 'CubiShop' with the functionality of 'SendMail'. Basically in short, I would like an interface that users could log into and send themselves an item in the in-game mail system; similar to the way in 'official' PWi, you can send yourself a Jones Blessing (via facebook connect).

    Of course this will be entirely separate from the actual plugin 'SendMail' because you would not want your user sending themselves a 'bajillion' coins. So it will retain a separate items.jsp, and users will only be able to send themselves item(s) that you have selected and entered into that separate items.jsp. The only two fields that will exist will be "character" and "item" (after logging in of course).

    So far I have been able to successfully create the majority of this functionality, and I am calling it 'GetItem' (at least for the time being/while in development). However I am running into one problem. When you select a specific character to send the item/mail to, it does not send to the specified character. It always sends the item/mail to the first, or main character of the account.

    I would greatly appreciate it if someone could help me finish this off, so that it does send the item/mail to the proper selected character.

    Here is what I have so far:
    Attached Files Attached Files


  2. #2
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Get Item

    Looks pretty good from what you have so far, I usually am more of a PHP Dev when it comes to web stuff but Ill see what I can do, would love to see where it can go (was actually thinking of doing something similar too)

    Edit: About the mail send "bug" you have, Im pretty sure it has to do with the way you have it set up for the selector list, Ill see what I can do with it to make it work

    Edit 2: Having a hidden value for the coins isnt very smart, your best bet would be to leave that a static 0 server side as a "smart" user could easily fake the post data (I changed that for you)

    Edit 3: Found the problem fixed it, script seems to be working fully now, the problem was you had 2 forms which I didnt notice at first, and you were probably thinking they got carried over when submitting again, I wouldve just used a session in php but I dont know how to do that in jsp so I added a hidden form with the currently selected roleid, hope that works for you!

    Here you are index.jsp fix
    Last edited by das7002; 30-08-10 at 05:19 PM.

  3. #3
    [B]aSH nofxpunkerbrian is offline
    MemberRank
    Apr 2009 Join Date
    1,151Posts

    Re: Get Item

    I use a similar sort of method for a web based item mall to quickly do donations. Pretty good work though.

  4. #4
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: Get Item

    I am failry new to JSP and PHP and the like, Thank you for the help :)
    Last edited by 343; 30-08-10 at 08:58 PM.

  5. #5
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Get Item

    Quote Originally Posted by 343 View Post
    I am failry new to JSP and PHP and the like, Thank you for the help :)
    Always happy to help

  6. #6
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: Get Item

    Quote Originally Posted by das7002 View Post
    Looks pretty good from what you have so far, I usually am more of a PHP Dev when it comes to web stuff but Ill see what I can do, would love to see where it can go (was actually thinking of doing something similar too)

    Edit: About the mail send "bug" you have, Im pretty sure it has to do with the way you have it set up for the selector list, Ill see what I can do with it to make it work

    Edit 2: Having a hidden value for the coins isnt very smart, your best bet would be to leave that a static 0 server side as a "smart" user could easily fake the post data (I changed that for you)

    Edit 3: Found the problem fixed it, script seems to be working fully now, the problem was you had 2 forms which I didnt notice at first, and you were probably thinking they got carried over when submitting again, I wouldve just used a session in php but I dont know how to do that in jsp so I added a hidden form with the currently selected roleid, hope that works for you!

    Here you are index.jsp fix
    re edit2: Thank you, I totally forgot to change that (I was going to)

    re edit3:
    "the problem was you had 2 forms which I didnt notice at first, and you were probably thinking they got carried over when submitting again"
    you are exactly right!

    "I wouldve just used a session in php but I dont know how to do that in jsp so I added a hidden form with the currently selected roleid, hope that works for you!"
    This accomplished the task at hand (it works for me :). I am sure there are even many different ways to do this, even within JSP, but this is just an area of 'programming' or 'coding' that brings out individuality within the individual writing it, and their knowledge (of course someone with more knowledge in a particular area can write something that will produce the same results, but attain them in a much more efficient way/method)

    Either way, I did learn something today, and I thank you for that!

  7. #7
    Member tahabata is offline
    MemberRank
    Sep 2010 Join Date
    98Posts

    Re: Get Item

    good job on this forum , active and usefull.this itemrar is working perfect the problem is that i want to add more items and i dont know ho wto do that , i undertand i will modify them in items.jsp from the server and stufs but inside beside the other ids the file request a Hex data of that item , and for ex i wana add some mats named :celestial shard , i found where to get the ids but i didnt find the Hex number so i can add it , i will post near the picture so u can undertand better , thx in advance
    Attached Thumbnails Attached Thumbnails hex-data.jpg  
    Last edited by tahabata; 10-10-10 at 03:37 PM.

  8. #8
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: Get Item

    some items actually wont have a hexdata

  9. #9
    Member tahabata is offline
    MemberRank
    Sep 2010 Join Date
    98Posts

    Re: Get Item

    good , i thought so , but if i dont put that hex i cant make the item , or can i?

  10. #10
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: Get Item

    for anything that doesn't have hex just leave it null in items.jsp

    "",

    ie:
    {"Item#", "ItemName", "", "0", "0", "1", "1", "0"},
    Last edited by 343; 11-10-10 at 05:50 PM.

  11. #11
    Black Magic Development das7002 is offline
    MemberRank
    Apr 2010 Join Date
    EarthLocation
    2,188Posts

    Re: Get Item

    Quote Originally Posted by 343 View Post
    for anything that doesn't have hex just leave it null in items.jsp

    "",

    ie:
    {"Item#", "ItemName", "", "0", "0", "1", "1", "0"},
    And here I was thinking that would be obvious

    I use the SendMail plugin all the time to send my logged in char modded equip w/o having to relog and using pwAdmin''s character editor

  12. #12
    Omega 343 is offline
    MemberRank
    Oct 2009 Join Date
    Ancient DGN CTYLocation
    5,514Posts

    Re: Get Item

    Quote Originally Posted by das7002 View Post
    And here I was thinking that would be obvious

    I use the SendMail plugin all the time to send my logged in char modded equip w/o having to relog and using pwAdmin''s character editor
    This is true, but with some of the novices around here lately I figured I would make sure to post in full detail so we didn't see any "how" or "it doesn't work" type of posts on this matter in the future ;)

  13. #13
    Member tahabata is offline
    MemberRank
    Sep 2010 Join Date
    98Posts

    Re: Get Item

    thx for ur help but it seems its not working , i mean i get item as i want by mail , but when i press Get Item from the mail ,, and i open my inventory Its nothing there , :( im sad , maybe u could tell me why ?

  14. #14
    Don't Ask About Tideborn vixio_dv is offline
    MemberRank
    Feb 2010 Join Date
    UKLocation
    774Posts

    Re: Get Item

    Quote Originally Posted by tahabata View Post
    thx for ur help but it seems its not working , i mean i get item as i want by mail , but when i press Get Item from the mail ,, and i open my inventory Its nothing there , :( im sad , maybe u could tell me why ?


    // item DB for send mail
    // items[index][0] -> item id
    // items[index][1] -> item name
    // items[index][2] -> xml octets for this item
    // items[index][3] -> Mask (default = 1)
    // items[index][4] -> Proctype (soulbound) (default = 0)
    // items[index][5] -> Stacked (default = 1)
    // items[index][6] -> Max Count (default = 1)
    // items[index][7] -> Expires In (default = 0)

    {"0", "Name", "XML", "Mask", "Proctype", "Stacked", "Max Count", "Expire Date"},

    i think not need a guide if you not understand, use google translate
    still not understand? please learn other first, before you try to use this.
    Last edited by vixio_dv; 13-10-10 at 08:51 PM.



Advertisement