[Tut]Cash Item on NPC !

Newbie Spellweaver
Joined
May 3, 2006
Messages
54
Reaction score
0
hey a release of mine..

hehe got my server back up ~ weeee all thanks to my brain :D
________________________________________

Okay ~ here's the thing !

i first will write you a script to make your shops choose-able for cash item.. such as this shown below..

Jianwei92 - [Tut]Cash Item on NPC ! - RaGEZONE Forums


hopefully you will understand what i mean..

so here's the script.. lets say i want use Henesys Manekineko as my NPC.. i will write this script as...
______________________________________________

INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000000, 1000000, 1);

INSERT INTO = insert this scripts into what kind of tables you wanted..

ShopItems = the table i chose to be insert

(shopid, itemid, price, position) = it's clearly stated.. the shopid , itemid , price and position..

Values = the code i will insert after this

2033 = the shop ID [you could execute your shopitems table to see which was your last shop ID, if your last shop ID is 2059, then your this script should be 2060 as for the shop ID]

1000000 = the price AKA mesos i will be put as 1mil as for this Cash Item sells

1 = Position, AKA the position in your shop.. let say you had 2 line but with different itemID, but then you wanted them to exchange place.. so remove 1 and insert 2 , remove 2 and insert 1.. and apply changes
________________________________________________

let's continue our scripting ya? :D
_____________________________

INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000000, 1000000, 1);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000001, 1000000, 2);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000002, 1000000, 3);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000003, 1000000, 4);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000004, 1000000, 5);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000005, 1000000, 6);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000006, 1000000, 7);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000007, 1000000, 8);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000008, 1000000, 9);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000009, 1000000, 10);

so now my shop will have 10 items !

Q : why everything is 2033
A : as i said before, 2033 is the shopID, so if you want anything to be put in that shop you wanted.. find the shopID to insert the code in that next line following by the next position

Q : what if i skip 3 to 6 of my position line?
A : i suggest you don't want to do that.. cause it might mess up your shop.. will also cause your shop having trouble to open from it !
______________________________________

let's carry on !
___________________________

after everything is insert.. i shall press 2 times of ENTER so that it will look more properly !

and insert this line as the following..

INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(2033, 9100001);

Q : why must write this line at below?
A : cause it will make the script to insert it to this shop as you stated.. the above scripts is just the shopitemID , and this below ones is your shopID together with the NPC code

Q : is there possible to change the npc code to another?
A : yes, you can referrer to this IDs and Commands List here !

Overall : 9100001 is Henesys Manekineko , npcID
Overall 2 : 2033 is the shopID i used
________________________________________

and also.. the 2033 is important !

if your above script put 2033 as your shopID , below MUST put 2033 as your shopID too ! it's just common sense :D
____________________________________________

if you get error below saying.. syntax error or something line 2033

means either you already had enter this script or this shopID has been used up by another npc.. you could just enter it too..

or you if enter it and having error and you wanted to remove it.. get to your shopitems table and find out the item code you inserted before..

and remove all the lines that you unwanted and tada ~
______________________________________________

so everything in this script will look like this..

INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000000, 1000000, 1);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000001, 1000000, 2);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000002, 1000000, 3);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000003, 1000000, 4);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000004, 1000000, 5);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000005, 1000000, 6);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000006, 1000000, 7);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000007, 1000000, 8);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000008, 1000000, 9);
INSERT INTO shopitems (shopid, itemid, price, position) VALUES (2033, 1000009, 1000000, 10);

INSERT INTO shops
(`shopid`, `npcid`)
VALUES
(2033, 9100001);

Any question? feel free to feedback ! :D
__________________________________________

Sorry if this guide has been made or something.. i don't know.. but i just spent quite alot time making this guide..

so probably hope someone understand it more clearly enough :)
__________________________________________________

The files i'd attached below is to help you out !

i had made this easier enough for you to enter it to your shops !

becareful.. some of the code im unsure that will having bug.. i mean some clothes having bugs it will make your dc or something..

so.. try out every single code :D
 

Attachments

Last edited:
Re: [Guide]Cash Item on NPC !

yeah i know.. but then it's easier to understand for people who doesn't know if it's possible to put cash items in shops like that...

i know there's already a release COCO cash seller.. but you only could see the cash name but couldn't see the cash item
 
Re: [Guide]Cash Item on NPC !

Err, on the Sean Repack V5.9 For Odin
Henesys Manekineko is the default NPC for the GM shop
The command is:
!npc 9100001
And to remove it it's:
!removenpcs (and everyone in that map must either change channels or logout to be removed)
 
Back