I have an idea to make an shop in web page..
Ive seen this on other shard and i would like to get it for mee too
i guess many people would like to get this, so who can help please
I have a Vendor, one vendor for all players, they can set items to sell or buy items from this vendor, and all is throught mysql but only in game..
At first here is what my database looks like where all items is collected in there from vendor
now this is what my vendor dialog looks like in game
and there is a scp dialog looks like when arraying the result
Code:
[DIALOG d_auction_item_list] //should be called with the bankbox of the auctioneer as default object
0,60
PAGE 0
NOMOVE
button 489 450 24 24 1 0 3 //my items
button 646 4 24 24 1 0 4 //search button
button 22 60 24 24 1 0 5 //platemail
button 22 80 24 24 1 0 6 //ringmail
button 22 100 24 24 1 0 7 //chainmail
button 22 120 24 24 1 0 8 //studded
button 30 140 24 24 1 0 9 //crystal sets
button 30 160 24 24 1 0 20 //crystal sets
button 15 180 24 24 1 0 10 //weapons
button 15 200 24 24 1 0 11 //bows
button 15 220 24 24 1 0 12 //mounts
button 349 450 24 24 1 0 13 // all items
button 419 450 24 24 1 0 14 //sell item
button 559 450 24 24 1 0 15 // cashout
button 15 240 24 24 1 0 16 //bottles
button 15 260 24 24 1 0 17 //imbues
button 13 415 24 24 1 0 18 //misc
button 15 40 24 24 1 0 19 //armors
resizepic 0 0 9300 800 480
resizepic 440 3 3000 200 22
resizepic 645 3 3000 60 22
resizepic 345 442 3000 65 35
resizepic 415 442 3000 65 35
resizepic 485 442 3000 65 35
resizepic 555 442 3000 65 35
resizepic 8 40 3000 253 400 //kreisa puse
resizepic 265 40 3000 528 400 //labaa puse
resizepic 8 26 3000 785 8 //augseja dala
dtext 8 5 6208 Uo Company Walmart
dtext 145 5 014D *
dtext 165 5 0112 - Sorting by latest Added item
dtext 650 40 014D Price (gp)
dtext 625 40 014D *
dtext 380 40 014D Name
dtext 654 3 6208 Search
dtext 300 40 014D Photo
dtext 350 448 014D All items
dtext 420 448 0112 Sell item
dtext 490 448 0225 My items
dtext 563 448 2015 Cashout
dtext 15 40 0112 Armors
dtext 25 60 6208 Platemail
dtext 25 80 6208 Ringmail
dtext 25 100 6208 Chainmail
dtext 25 120 6208 Studded/Leather
dtext 25 140 6208 Crystal
dtext 25 160 6208 Bone
dtext 15 180 0112 Weapons
dtext 15 200 0112 Bows
dtext 15 220 0112 Mounts
dtext 15 240 0112 Bottles
dtext 15 260 0112 Imbues
dtext 15 415 0112 Misc
LOCAL.VALUE=<src.tag0.cashpoints>
IF (<LOCAL.VALUE> = 0)
dtext 100 448 6208 0 Gp
ELSEIF (<LOCAL.VALUE> >= 1000) && (<LOCAL.VALUE> <= 9999)
LOCAL.NEWHALF=<dLOCAL.VALUE>>
dtext 100 448 6208 <dLOCAL.newhalf> Gp
ELSEIF (<LOCAL.VALUE> >= 10000) && (<LOCAL.VALUE> <= 99999)
LOCAL.NEWHALF=<STRSUB 0 2 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 2 3 <dLOCAL.VALUE>>
dtext 100 448 6208 <dLOCAL.newhalf><LOCAL.newhalf2> Gp
ELSEIF (<LOCAL.VALUE> >= 100000) && (<LOCAL.VALUE> <= 999999)
LOCAL.NEWHALF=<STRSUB 0 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 3 3 <dLOCAL.VALUE>>
dtext 100 448 6208 <dLOCAL.newhalf><LOCAL.newhalf2> Gp
ELSEIF (<LOCAL.VALUE> >= 1000000) && (<LOCAL.VALUE> <= 9999999)
LOCAL.NEWHALF=<STRSUB 0 1 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 1 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF3=,<STRSUB 4 3 <dLOCAL.VALUE>>
dtext 100 448 6208 <dLOCAL.newhalf><LOCAL.newhalf2><LOCAL.newhalf3> Gp
ELSEIF (<LOCAL.VALUE> >= 10000000) && (<LOCAL.VALUE> <= 99999999)
LOCAL.NEWHALF=<STRSUB 0 2 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 2 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF3=,<STRSUB 5 3 <dLOCAL.VALUE>>
dtext 100 448 6208 <dLOCAL.newhalf><LOCAL.newhalf2><LOCAL.newhalf3> Gp
ELSEIF (<LOCAL.VALUE> >= 100000000) && (<LOCAL.VALUE> <= 1000000000)
LOCAL.NEWHALF=<STRSUB 0 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 3 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF3=,<STRSUB 6 3 <dLOCAL.VALUE>>
dtext 100 448 6208 <dLOCAL.newhalf><LOCAL.newhalf2><LOCAL.newhalf3> Gp
endif
dtext 15 448 0112 Money earned:
dtextentry 443 3 255 25 0112
////PAGE SYSTEM
//DB.QUERY "SELECT * FROM <tag.auction_table> ORDER BY `id` DESC LIMIT 99999999";
DB.QUERY "SELECT COUNT(*) as category_allitems FROM <tag.auction_table> ORDER BY `id` DESC LIMIT 99999999";
src.ctag.totalpages=<eval (((<db.row.0.category_allitems>-1) / 8) + 1)>
dtext 715 3 0481 Items: <eval (<db.row.0.category_allitems>)>
dtext 623 448 0481 Page: [<eval <src.ctag.actualpage>>/<eval <src.ctag.totalpages>>]
if <eval (<db.row.0.category_allitems> < 1)>
dtext 380 100 0112 There is no items in the Walmart
endif
//Mysql query that fetches the rows from <src.ctag.dialogindex> to <src.ctag.dialogindex>+8
DB.QUERY "SELECT * FROM <tag.auction_table> ORDER BY `vip` DESC, `id` DESC LIMIT <eval (<src.ctag.dialogindex>)>,<eval (<src.ctag.dialogindex>+8)>";
FOR index 0 7
LOCAL.VALUE=<db.row.<eval (<local.index>)>.currentbid>
if <db.row.<eval (<local.index>)>.uid>
local.y=(((<local.index>)*45)+65)
local.x=(((<local.index>)*45)+55)
local.xs=(((<local.index>)*45)+97)
local.ys=(((<local.index>)*45)+68)
local.ys2=(((<local.index>)*45)+58)
local.buy=(((<local.index>)*45)+66)
local.name=(((<local.index>)*45)+80)
if <eval (<db.row.<eval (<local.index>)>.vip> > 0)>
dtext 380 <local.y> 014d <uid.<db.row.<eval (<local.index>)>.uid>.name> -VIP-
else
dtext 380 <local.y> 0 <uid.<db.row.<eval (<local.index>)>.uid>.name>
endif
resizepic 640 <local.ys2> 3000 100 42 //Lai naudu redz
button 759 <local.ys> 5224 5003 1 0 <eval (<db.row.<eval (<local.index>)>.id>+10)>
IF (<LOCAL.VALUE> >= 1) && (<LOCAL.VALUE> <= 9999)
LOCAL.NEWHALF=<dLOCAL.VALUE>>
dtext 650 <local.y> 0 <dLOCAL.newhalf>
ELSEIF (<LOCAL.VALUE> >= 10000) && (<LOCAL.VALUE> <= 99999)
LOCAL.NEWHALF=<STRSUB 0 2 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 2 3 <dLOCAL.VALUE>>
dtext 650 <local.y> 0 <dLOCAL.newhalf><LOCAL.newhalf2>
ELSEIF (<LOCAL.VALUE> >= 100000) && (<LOCAL.VALUE> <= 999999)
LOCAL.NEWHALF=<STRSUB 0 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 3 3 <dLOCAL.VALUE>>
dtext 650 <local.y> 0 <dLOCAL.newhalf><LOCAL.newhalf2>
ELSEIF (<LOCAL.VALUE> >= 1000000) && (<LOCAL.VALUE> <= 9999999)
LOCAL.NEWHALF=<STRSUB 0 1 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 1 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF3=,<STRSUB 4 3 <dLOCAL.VALUE>>
dtext 650 <local.y> 0 <dLOCAL.newhalf><LOCAL.newhalf2><LOCAL.newhalf3>
ELSEIF (<LOCAL.VALUE> >= 10000000) && (<LOCAL.VALUE> <= 99999999)
LOCAL.NEWHALF=<STRSUB 0 2 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 2 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF3=,<STRSUB 5 3 <dLOCAL.VALUE>>
dtext 650 <local.y> 0 <dLOCAL.newhalf><LOCAL.newhalf2><LOCAL.newhalf3>
ELSEIF (<LOCAL.VALUE> >= 100000000) && (<LOCAL.VALUE> <= 1000000000)
LOCAL.NEWHALF=<STRSUB 0 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF2=,<STRSUB 3 3 <dLOCAL.VALUE>>
LOCAL.NEWHALF3=,<STRSUB 6 3 <dLOCAL.VALUE>>
dtext 650 <local.y> 0 <dLOCAL.newhalf><LOCAL.newhalf2><LOCAL.newhalf3>
endif
tilepichue 300 <local.x> <eval <uid.<db.row.<eval (<local.index>)>.uid>.id>> <eval <uid.<db.row.<eval (<local.index>)>.uid>.color>>
resizepic 275 <local.xs> 9300 507 5 <db.row.<eval (<local.index>)>.uid>
resizepic 750 <local.buy> 9300 37 20 <db.row.<eval (<local.index>)>.uid>
dtext 758 <local.buy> 0112 Buy
dtext 650 <local.name> 0481 By <uid.<db.row.<eval (<local.index>)>.seller>.name>
if (<uid.<db.row.<eval (<local.index>)>.uid>.istalisman>)
elif (<uid.<db.row.<eval (<local.index>)>.uid>.isarmor>)
dtext 381 <local.name> 0481 Dur: <uid.<db.row.<eval (<local.index>)>.uid>.MORE1L>/<uid.<db.row.<eval (<local.index>)>.uid>.MORE1H>
ELif (<uid.<db.row.<eval (<local.index>)>.uid>.isjeweli>)
dtext 500 <local.name> 0481 Plus +<uid.<db.row.<eval (<local.index>)>.uid>.MOREX>
dtext 381 <local.name> 0481 Charges: <uid.<db.row.<eval (<local.index>)>.uid>.MOREM>
ELif (<uid.<db.row.<eval (<local.index>)>.uid>.isjewelires>)
dtext 381 <local.name> 0481 Charges: <uid.<db.row.<eval (<local.index>)>.uid>.MOREM>
ELIF (<uid.<db.row.<eval (<local.index>)>.uid>.type>==t_jewelry)
dtext 381 <local.name> 0481 Charges: <eval <uid.<db.row.<eval (<local.index>)>.uid>.tag.charge>>
ELIF (<uid.<db.row.<eval (<local.index>)>.uid>.type>==t_charm)
dtext 381 <local.name> 0481 Charges: <eval <uid.<db.row.<eval (<local.index>)>.uid>.morex>>
ELIF (<uid.<db.row.<eval (<local.index>)>.uid>.baseid>==i_treature_map)
dtext 381 <local.name> 0481 Level: <eval <uid.<db.row.<eval (<local.index>)>.uid>.tag.tlevel>>
ELIF <uid.<db.row.<eval (<local.index>)>.uid>.isweapon>
dtext 500 <local.name> 0481 Dmg: <uid.<db.row.<eval (<local.index>)>.uid>.DAM>
dtext 381 <local.name> 0481 Dur: <uid.<db.row.<eval (<local.index>)>.uid>.MORE1L>/<uid.<db.row.<eval (<local.index>)>.uid>.MORE1H>
ELIF <uid.<db.row.<eval (<local.index>)>.uid>.amount> > 1
dtext 381 <local.name> 0481 Amount: <uid.<db.row.<eval (<local.index>)>.uid>.amount>
ENDIF
endif
ENDFOR
And there is the mysql code that inserts info in database
Code:
DB.EXECUTE "INSERT INTO <topobj.tag.auction_table>(uid, amount, category, name, currentbid, step, minimum_price, saletime, seller) VALUES('<link.uid>','<link.amount>','<eval <tag.category>>','<link.name>','<eval (<argtxt[1]>)>','0','0','99999999999','<src.uid>');"
DB.query "SELECT saletime FROM <topobj.tag.auction_table> WHERE uid='<link.uid>'"
How i can transfer all this, to set this vendor dialog appears on website??
1. i need all pictures get from server and host them to website, okey i can do that.. but i need each color to be hosted of each armor,weapon ect? or just 1 and then i can change color like ingame <hue> ??
If somebody knows about this then please give me advice
Cheers.