Post Pacific

Post Pacific (https://postpacific.loc-online.com/index.php)
-   Темы без сохранившегося раздела (https://postpacific.loc-online.com/forumdisplay.php?f=10001)
-   -   Creating new NPC (https://postpacific.loc-online.com/showthread.php?t=1122)

Dave 05.07.2005 17:59

Creating new NPC
 
I have read the forums but didnt find the answer im looking for..I want to copy/create new npc to exchange and check..my questions are this..

*if I copy npc in npcdata.txt (i.e alexandria) and rename to (hera) but with same npc number will this cause an issue. or do I randomly generat the citizen #.

*Im assuming after I add her to the npcpos.txt, I need to edit client side to have "hera" is there?

*and last, since /loc doesnt work is there anyother way to find coordinates in game?

bobby 05.07.2005 18:13

If you check the mods section I recently made a tutorial for making the actual npc.

After that you need to find an npc that has a quest that requires you to exchange items.

Once you find the item the quest is exchanging, then you can simply edit that to match the item your trying to allow in the exchange.

Of course you would copy the exchange lines into your custom npc.

toolpunk 05.07.2005 18:24

for the coordinates use a phpmap, lol :D :D :D :p
the other stuff:
yeah bobby did a good 2torial for this.
and of course u must change the other stuff ;)

Dave 05.07.2005 18:32

new npc
 
ok. i understand this tutorial thank you so much. my other question is this, this NPC just sells items. what im trying to do is have an npc like in lux shop in giran that has items for sale but not for adena.. they will need to have a speicific set of items.(ie. like 10 dyes) to purchase..

and where do I get php map with coordinates?

toolpunk 05.07.2005 18:39

php map --> search! sry no better answer. thats what i would do...
then just take a look at the ai.obj stuff of the traders in aden u want 2 use as basis...
copy the stuff and change the payment method 2 whatever u like (if this is possible, i dunno cuz i dun tried yet... but should work i think. if not --> sorry)

bobby 05.07.2005 19:15

what i posted was to use the making a npc tutorial to make the npc, then find a npc with a quest that requires you to exchange an item. copy the exchange part and use that and edit it to the item(s) you want to exchange.

I'll try to write a tutorial for that at soem point too.

Dave 05.07.2005 19:15

ai.obj
 
push_const 332[glow=red] is this the item number the npc is pushing to the PC?

bobby 05.07.2005 19:51

that looks like you copied it from a section to make an item glow..

give me a sec, I was creating auto back up for my server... give me a few mins.

bobby 05.07.2005 20:14

well I havent decoded it all but this is a major part you will need to learn and understand.

shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 4629 // 0級紅色搜魂石
func_call 81 // func[OwnItemCount]
shift_sp -2
push_const 1
equal
branch_false L90316

shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 4630 // 1級紅色搜魂石
push_const 1
func_call 77 // func[GiveItem1]
shift_sp -3
shift_sp -1

shift_sp 1
push_event // c1
push_const 276
add
fetch_i
push_const 4629
push_const 1
func_call 80 // func[DeleteItem1]
shift_sp -3
shift_sp -1
jump L90315

bobby 05.07.2005 20:15

this checks item, the gives an item then deletes the item that was traded in inventory for the new item or it should..

Dave 06.07.2005 00:39

ai.obj
 
there are 24 possible dyes..so from what you wrote I would need that code for each right? now what if the count that they have to have is 10 of say item 3265 before the NPC will give the 1 item which may be some tattoo. in other words the pc has to have 10 of a certain item before Npc will give tatto.

Secondly, what I wrote above was an excert from ai.obj, but my question is where is the item number to give and take..


All times are GMT. The time now is 15:24.