RaGEZONE sponsored advertisment:
| | The free 3D side scrolling MMORPG. | |
08-25-2009
|
#1 (permalink)
| | RIP Akaruz, The Godfather
Rank: Alpha Member Join Date: Oct 2008 Location: Ontario, Canada
Posts: 2,930
Thanked 333 Times in 195 Posts
| [Release] All In One Shop
Ok so... I know this has been released a billion and one times, but yet people still seem to have issues with it. So, I took it upon myself to redo it. I've narrowed down the sql from around 17k lines to only 5k lines. I've also done one of the shortest variations possible (not the shortest though) for this kind of NPC. Enjoy.
EDIT: There seems to still be people who have problems with this (don't see how it's possible) so here is the script to use. PHP Code: /****
* Created by : bboy242 a.k.a. Shawn
* Special Thanks: Moogra for insight on pro command
****/
var status;
var text = "What would you like to browse?";
function start() {
status = -1;
action(1, 0, 0);
}
function action(mode, type, selection) {
if (mode == 1)
status++;
else {
cm.sendOk("#e#kOk, see you next time!");
cm.dispose();
return;
}
if (status == 0) {
cm.sendNext("#e#k Hello #h #. I am the All in One seller of ."); // enter your server name.
} else if (status == 1) {
cm.sendSimple("" + text + " \r\n\r\n#L0##e#rMagician#l\r\n#L1#Thief#l\r\n#L2#Warrior#l\r\n#L3#Archer#l\r\n#L4#Pirate#l\r\n#L5#Common#l\r\n#L6#NX Items#l\r\n#L7#ETC#l");
} else if (status == 2) {
if (selection == 0) { // Magician Choices
cm.sendSimple("" + text + " \r\n\r\n#L0##e#rHats#l\r\n#L1#Overalls#l\r\n#L2#Gloves#l\r\n#L3#Shields#l\r\n#L4#Shoes#k#l\r\n#L5##rWands#l\r\n#L6#Staffs#l");
} else if (selection == 1) { // Thief Choices
cm.sendSimple("" + text + " \r\n\r\n#L7##e#bHats#l\r\n#L8#Tops#l\r\n#L9#Bottoms#l\r\n#L10#Overalls#l\r\n#L11#Gloves#l\r\n#L12#Shields#l\r\n#L13#Shoes#l\r\n#L14#Daggers#l\r\n#L15#Claws#l\r\n#L16#Throwing Stars#l");
} else if (selection == 2) { // Warrior Choices
cm.sendSimple("" + text + " \r\n\r\n#L17##e#dHats#l\r\n#L18#Warrior Top#l\r\n#L19#Bottom#l\r\n#L20#Overalls#l\r\n#L21#Gloves#l\r\n#L22#Shields#l\r\n#L23#Shoes#l\r\n#L24#One-Handed Axes#l\r\n#L25#Two-Handed Axes#l\r\n#L26#One-Handed BWs#l\r\n#L27#Two-Handed BWs#l\r\n#L28#One-Handed Swords#l\r\n#L29#Two-Handed Swords#l\r\n#L30#Spears#l\r\n#L31#Pole Arms#l");
} else if (selection == 3) { // Archer Choices
cm.sendSimple("" + text + " \r\n\r\n#L32##e#gHats#l\r\n#L33#Overalls#l\r\n#L34#Gloves#l\r\n#L35#Shoes#l\r\n#L36#Bows#l\r\n#L37#CrossBows#l\r\n#L38#Arrows#l");
} else if (selection == 4) { // Pirate Choices
cm.sendSimple("" + text + " \r\n\r\n#L39##e#bHats#l\r\n#L40#Overalls#l\r\n#L41#Gloves#l\r\n#L42#Shoes#l\r\n#L43#Weapons#l\r\n#L44#Bullets and Capsules#l");
} else if (selection == 5) { // Common Choices
cm.sendSimple("" + text + " \r\n\r\n#L45##e#dHats#l\r\n#L46#Earrings#l\r\n#L47#Necklaces and Face Accessories#l\r\n#L48#Capes#l\r\n#L49#Overalls#l\r\n#L50#Gloves#l\r\n#L51#Shields#l\r\n#L52#Shoes#l\r\n#L53#Maple Weapons#l\r\n#L54#Level 0 Weapons#l");
} else if (selection == 6) { // NX Choices
cm.sendSimple("" + text + " \r\n\r\n#L55##e#bHats#l\r\n#L56#Earrings#l\r\n#L57#Face#l\r\n#L58#Tops#l\r\n#L59#Bottoms#l\r\n#L60#Capes#l\r\n#L61#Overalls#l\r\n#L62#Rings#l\r\n#L63#Gloves#l\r\n#L64#Shields#l\r\n#L65#Shoes#l\r\n#L66#Weapons#l\r\n#L67#Throwing Stars#l\r\n#L68#Pets#l\r\n#L69#Pet Misc#l\r\n#L70#Emotion#l\r\n#L71#Effects#l\r\n#L72#Accessories#l\r\n#L73#Player FM Stores#l");
} else if (selection == 7) { // ETC Choices
cm.sendSimple("" + text + " \r\n\r\n#L74##e#rMessengers#l\r\n#L75#Super Megaphones, Gachapon Tickets, Rocks, and Morphs#l\r\n#L76#Boss Pieces#l\r\n#L77#Buffs and Potions#l\r\n#L78#Scrolls#l\r\n#L79#Summoning Sacks#l\r\n#L80#Chairs#l\r\n#L81#Mounts#l");
}
} else if (status == 3) {
cm.openShop(5000+selection);
cm.dispose();
}
}
NOTE: Read the READ ME if you don't know how to set this up.
Links
Flame if you want for another release of this kind. I was tired of seeing countless threads regarding this so now they can't have this problem anymore.
EDIT 1: New sql/script and links to download. Pictures are below. I only added 2 because lets face it... if you haven't seen an All in One seller before, you haven't played Pservers for long
Image 1
Image 2 EDIT 2:
If by some chance you get an error while exectuting the SQL, follow these steps. STEP 1: Delete these lines from the All in One.sql. PHP Code: /* Deletes shops in that range */
DELETE FROM `shops` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
/* Deletes shop items in those shops */
DELETE FROM `shopitems` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
STEP 2: Execute this line, by placing it where the picture shows. PHP Code: DELETE FROM `shops` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
STEP 3: Execute this line, by placing it where the picture shows. PHP Code: DELETE FROM `shopitems` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
STEP 4: Execute the All in One.sql.
This seriously shouldn't need to be explained but I guess some people have trouble with it o.0
Last edited by DevonsDaddy; 09-11-2009 at 10:57 PM.
|
| | | Thanked by : | Bartvo, BelgarathChris, Blackscarf, brandonspeed200, DevAce, henki133, hoholove8, Hubba, iJFAC, MadaraUchiha, Matthewisgreat, Moogra, myangel, RebelWho, SpongeBox, stapled, ToyFork, xdanl, yengqin |
RaGEZONE sponsored advertisment:
08-25-2009
|
#2 (permalink)
| | Owner of..me,myself and i
Rank: Member + Join Date: Nov 2008 Location: Behind the comp
Posts: 574
Thanked 68 Times in 66 Posts
| Re: [Release] All In One Shop
nice job
i guess a lot ppl that got erors with their shops can use this 1
__________________ Thank me if i helped  |
| | 
Endorsement
08-25-2009
|
#3 (permalink)
| | Ultimate Member
Rank: Member
Join Date: Feb 2008 Location: I am Canadian! I do not live in an igloo I live in a house. I do not say "aboot" i say "about" now tell your friends!
Posts: 150
Thanked 1 Time in 1 Post
| Re: [Release] All In One Shop
i get this error when i run the sql file Code: Script line: 1 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<= 5081' at line 1
__________________ Code:
im not as active any more because of school
|
| | 
Endorsement
08-25-2009
|
#4 (permalink)
| | Owner of..me,myself and i
Rank: Member + Join Date: Nov 2008 Location: Behind the comp
Posts: 574
Thanked 68 Times in 66 Posts
| Re: [Release] All In One Shop
|
Originally Posted by stapled |
i get this error when i run the sql file Code: Script line: 1 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<= 5081' at line 1
| i am not sure this will help but try this : Code: DELETE FROM `shops` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
__________________ Thank me if i helped 
Last edited by AngelOfLove; 08-25-2009 at 03:40 AM.
|
| |
08-25-2009
|
#5 (permalink)
| | Murawd Was Here
Rank: Alpha Member Join Date: Jan 2009 Location: Illinois, U.S.
Posts: 2,492
Thanked 118 Times in 35 Posts
| Re: [Release] All In One Shop
Nice contribution.
__________________ We avoid risks in life to make it safely to death. |
| |
08-25-2009
|
#6 (permalink)
| | MapleFun <3
Rank: Member + Join Date: Feb 2009 Location: SquishyStory.
Posts: 243
Thanked 4 Times in 4 Posts
| Re: [Release] All In One Shop
Error in MySQL.
__________________ lol stfu. |
| |
08-25-2009
|
#7 (permalink)
| | Ultimate Member
Rank: Member
Join Date: Feb 2008 Location: I am Canadian! I do not live in an igloo I live in a house. I do not say "aboot" i say "about" now tell your friends!
Posts: 150
Thanked 1 Time in 1 Post
| Re: [Release] All In One Shop
i got it to work but the npc just tells me that he is the all in one seller and when you click next nothing happens
__________________ Code:
im not as active any more because of school
|
| |
08-25-2009
|
#8 (permalink)
| | I post to much!
Rank: Member + Join Date: Jan 2009 Location: Canada
Posts: 581
Thanked 15 Times in 12 Posts
| Re: [Release] All In One Shop
Nice job man! +1
And might wana add some pictures.
EDIT:Uploading some pics.
__________________ Anime-Stream!
Last edited by Hubba; 08-25-2009 at 04:29 AM.
|
| |
08-25-2009
|
#9 (permalink)
| | Ragezone Member
Rank: Member + Join Date: Jan 2009 Location: Australia
Posts: 773
Thanked 41 Times in 37 Posts
| Re: [Release] All In One Shop
Good Job man +thanks for you
|
| |
08-25-2009
|
#10 (permalink)
| | Alpha
Rank: Member
Join Date: May 2008
Posts: 134
Thanked 0 Times in 0 Posts
| Re: [Release] All In One Shop
|
Originally Posted by stapled | |
i got it to work but the npc just tells me that he is the all in one seller and when you click next nothing happens
| Same here ):
|
| |
08-25-2009
|
#11 (permalink)
| | RIP Akaruz, The Godfather
Rank: Alpha Member Join Date: Oct 2008 Location: Ontario, Canada
Posts: 2,930
Thanked 333 Times in 195 Posts
| Re: [Release] All In One Shop
|
Originally Posted by stapled |
i get this error when i run the sql file Code: Script line: 1 You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '<= 5081' at line 1
|
|
Originally Posted by LiquidMS | |
Error in MySQL.
|
|
Originally Posted by stapled | |
i got it to work but the npc just tells me that he is the all in one seller and when you click next nothing happens
|
|
Originally Posted by harrychong | |
Same here ):
| It's fixed now. For some reason with the SQL, even though the command was correct, it wouldn't execute. So I had to copy/paste from a previous one and edit the shop id's. Still makes no sense why it wasn't working though since it's the same exact sql command lol. It is working 100% now though. I even ran the sql 10 times to be sure it works.
|
| |
08-25-2009
|
#12 (permalink)
| | MapleFun <3
Rank: Member + Join Date: Feb 2009 Location: SquishyStory.
Posts: 243
Thanked 4 Times in 4 Posts
| Re: [Release] All In One Shop
|
Originally Posted by bboy242 | |
It's fixed now. For some reason with the SQL, even though the command was correct, it wouldn't execute. So I had to copy/paste from a previous one and edit the shop id's. Still makes no sense why it wasn't working though since it's the same exact sql command lol. It is working 100% now though. I even ran the sql 10 times to be sure it works.
| What if it doesn't work for me?
__________________ lol stfu. |
| |
08-25-2009
|
#13 (permalink)
| | RIP Akaruz, The Godfather
Rank: Alpha Member Join Date: Oct 2008 Location: Ontario, Canada
Posts: 2,930
Thanked 333 Times in 195 Posts
| Re: [Release] All In One Shop
|
Originally Posted by LiquidMS | |
What if it doesn't work for me?
| If it don't... which I highly doubt it won't since it worked 10 times in a row for me.... take out the Code: /* Deletes shops in that range */
DELETE FROM `shops` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
/* Deletes shop items in those shops */
DELETE FROM `shopitems` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
and execute them one at a time. Then execute the all in one.sql
If the NPC doesn't work, it's your source/repack that's making it not work because it works 100%.
|
| |
08-25-2009
|
#14 (permalink)
| | Elite Subscriber!
Rank: Subscriber Join Date: Dec 2008
Posts: 199
Thanked 11 Times in 8 Posts
| Re: [Release] All In One Shop
Lol i can back Shawn up on that.. It works 100%...
Good Release Shawn!
|
| |
08-25-2009
|
#15 (permalink)
| | RIP Akaruz, The Godfather
Rank: Alpha Member Join Date: Oct 2008 Location: Ontario, Canada
Posts: 2,930
Thanked 333 Times in 195 Posts
| Re: [Release] All In One Shop
Edited post to include the scripts for the people that may be too lazy to download it.
@Off Topic: Whats up with the tags? I didn't add any, and if I did, I sure as hell wouldn't use "wan" as a tag o.0
|
| |
08-26-2009
|
#16 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Aug 2009
Posts: 2
Thanked 0 Times in 0 Posts
| Re: [Release] All In One Shop
Hey it dont work for me i dont know if i did something wrong
look
I put the script in a npc
I Executed the sql
i started my server, clicked the npc and works good but when i go to the store, like theif shop or any shop its empty... i just see the chineese guy storekeeper that sells nothing... help?
|
| |
08-26-2009
|
#17 (permalink)
| | Ultimate Member
Rank: Member
Join Date: Feb 2008 Location: I am Canadian! I do not live in an igloo I live in a house. I do not say "aboot" i say "about" now tell your friends!
Posts: 150
Thanked 1 Time in 1 Post
| Re: [Release] All In One Shop
|
Originally Posted by Jimmyxx |
Hey it dont work for me i dont know if i did something wrong
look
I put the script in a npc
I Executed the sql
i started my server, clicked the npc and works good but when i go to the store, like theif shop or any shop its empty... i just see the chineese guy storekeeper that sells nothing... help?
| run the sql script again and make sure it gets no errors
__________________ Code:
im not as active any more because of school
|
| |
08-26-2009
|
#18 (permalink)
| | RIP Akaruz, The Godfather
Rank: Alpha Member Join Date: Oct 2008 Location: Ontario, Canada
Posts: 2,930
Thanked 333 Times in 195 Posts
| Re: [Release] All In One Shop
|
Originally Posted by Jimmyxx |
Hey it dont work for me i dont know if i did something wrong
look
I put the script in a npc
I Executed the sql
i started my server, clicked the npc and works good but when i go to the store, like theif shop or any shop its empty... i just see the chineese guy storekeeper that sells nothing... help?
| http://forum.ragezone.com/f427/relea...8/#post5220419
click that link please
|
| |
08-26-2009
|
#19 (permalink)
| | Average Member
Rank: Hobbit
Join Date: Feb 2009
Posts: 55
Thanked 0 Times in 0 Posts
| Re: [Release] All In One Shop
i need help too . same result as Jimmyxx.
|
| |
08-26-2009
|
#20 (permalink)
| | RaGEZONER
Rank: Hobbit
Join Date: Nov 2008
Posts: 98
Thanked 5 Times in 5 Posts
| Re: [Release] All In One Shop
Nice release. :D
|
| |
08-26-2009
|
#21 (permalink)
| | Elite Subscriber!
Rank: Subscriber Join Date: Dec 2008
Posts: 199
Thanked 11 Times in 8 Posts
| Re: [Release] All In One Shop
|
Originally Posted by oswaldwu | |
i need help too . same result as Jimmyxx.
| Remove this from the SQL PHP Code: /* Deletes shops in that range */
DELETE FROM `shops` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
/* Deletes shop items in those shops */
DELETE FROM `shopitems` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
And Re-Execute the sql...
|
| |
08-26-2009
|
#22 (permalink)
| | Newbie
Rank: Hobbit
Join Date: Aug 2009
Posts: 2
Thanked 0 Times in 0 Posts
| Re: [Release] All In One Shop
|
Originally Posted by DevAce |
Remove this from the SQL PHP Code: /* Deletes shops in that range */
DELETE FROM `shops` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
/* Deletes shop items in those shops */
DELETE FROM `shopitems` WHERE `shopid` >= 5000 AND `shopid` <= 5081;
And Re-Execute the sql...
| I deleted the lines now i get duplicate error in 5000 what i should do
|
| |
08-26-2009
|
#23 (permalink)
| | RIP Akaruz, The Godfather
Rank: Alpha Member Join Date: Oct 2008 Location: Ontario, Canada
Posts: 2,930
Thanked 333 Times in 195 Posts
| Re: [Release] All In One Shop
|
Originally Posted by Jimmyxx | |
I deleted the lines now i get duplicate error in 5000 what i should do
| *sigh*
did you look at the lines you deleted? did you look at the thread at all? like... everyones' posts? here, i'll edit the top post yet again.
|
| |
08-26-2009
|
#24 (permalink)
| | Member
Rank: Hobbit
Join Date: Jul 2008
Posts: 27
Thanked 0 Times in 0 Posts
| Re: [Release] All In One Shop
Great ++ :D
But when i open the Npc it work, but when i should buy something from the different classes, it ends up with nothing.
The Npc, who should sell the Equips don't have equips,its all empty. :/
I have exuded the Sql, from your File-front "all in One".
|
| |
08-26-2009
|
#25 (permalink)
| | Account Upgraded | Title Enabled!
Rank: Member + Join Date: Jul 2008 Location: Stalker
Posts: 1,158
Thanked 0 Times in 0 Posts
| Re: [Release] All In One Shop
Error: unkown cloumn '1' in 'field list'
|
| | | Tags | can't, download, files, hey, how to, html, love, needed, npc, people, php, problem, rapidshare, read, release, repack, screen, seller, shop, source, sql, tomorrow, wan, work, [release]  | |