Page 1 of 2
Fishing (resolved)
Posted: Mon Sep 28, 2009 2:57 pm
by bolly
Hey all,
I'm a bit confused on the harvesting front as i'm not seeing anything pop up or a right click menu when I assign a primary command to an npc (ie 5 for fish or 4 for harvest)
I've got entries in my spawn_ground and groundspawn_items but i'm wondering if there's something else I need to do
just to note i can set this npc as say bank or npcfinder and it's fine
Cheers in advance
Bolly
Re: Fishing
Posted: Mon Sep 28, 2009 3:43 pm
by John Adams
Soon as you give the command_primary to the NPC, that command should show up when you right-click, even if none of the other stuff is configured. Fiddle with the attackable, targetable, etc... booleans, see if they change anything.
This is a screen shot from our editor, showing the setup of one of our fishing nodes. This alone should show the right-click menu.
fishing.jpg
Re: Fishing
Posted: Mon Sep 28, 2009 3:58 pm
by bolly
show_command_icon was the one! thanks again!
Re: Fishing
Posted: Mon Sep 28, 2009 4:02 pm
by John Adams
Ahh yes, that makes the command visible doesn't it...

I knew it was one of them.
Re: Fishing
Posted: Mon Sep 28, 2009 4:03 pm
by bolly
ya it must be with certain skills because banking and merchants etc are fine!

Re: Fishing
Posted: Mon Sep 28, 2009 4:41 pm
by bolly
hmm pops up but nothing happens on click, i have my fishing showing in the skills tab
*ponders something to do with spells*?
Re: Fishing
Posted: Mon Sep 28, 2009 6:00 pm
by Scatman
Yeah add a spell called fishing (case sensitive). When I re-did the way entity commands are processed, I forgot about harvesting

Eventually I'd like to make it so you won't need a spell.
Re: Fishing
Posted: Mon Sep 28, 2009 7:47 pm
by bolly
hey, got it working but have to go into my spell book to run it (it's called lowercase 'fishing') > i did kinda clone my harvesting one though (which strangely also allows me to harvest fish!)
I'm gonna poke about with the flags on the spell now and see if i can change the animation and get it to fire when i right click a school of fish, but any tips would be appreciated!
Re: Fishing
Posted: Mon Sep 28, 2009 7:58 pm
by Scatman
You shouldn't need to go into your spell book. Make sure the groundspawn uses the fishing skill (collection_skill in spawns_ground table). Also make sure the groundspawn is set to attackable=0 and of course show_entity_command=1.
Re: Fishing
Posted: Mon Sep 28, 2009 8:10 pm
by bolly
this is what i had in my spawn_ground
mysql> select * from spawn_ground;
+----+----------+-----------------+--------------------------+----------------------+------------------+
| id | spawn_id | number_harvests | num_attempts_per_harvest | groundspawn_entry_id | collection_skill |
+----+----------+-----------------+--------------------------+----------------------+------------------+
| 1 | 89 | 5 | 1 | 1 | Fishing |
+----+----------+-----------------+--------------------------+----------------------+------------------+
1 row in set (0.00 sec)
Re: Fishing
Posted: Mon Sep 28, 2009 8:13 pm
by bolly
mysql> select * from spawn where id = 89;
+----+----------------+-----------+------+------------+------+-------------+------------+-----------+-----------------+-------------------+--------------+------------+------------+-------------------+-------------------+------------+------------------+----+-------+-------------+--------------+---------------+
| id | name | sub_title | race | model_type | size | size_offset | targetable | show_name | command_primary | command_secondary | visual_state | attackable | show_level | show_command_icon | display_hand_icon | faction_id | collision_radius | hp | power | merchant_id | transport_id | merchant_type |
+----+----------------+-----------+------+------------+------+-------------+------------+-----------+-----------------+-------------------+--------------+------------+------------+-------------------+-------------------+------------+------------------+----+-------+-------------+--------------+---------------+
| 89 | School of Fish | NULL | 255 | 4159 | 32 | 0 | 1 | 1 | 5 | 3452816845 | 0 | 0 | 0 | 1 | 0 | 0 | 32 | 26 | 26 | 0 | 0 | 0 |
+----+----------------+-----------+------+------------+------+-------------+------------+-----------+-----------------+-------------------+--------------+------------+------------+-------------------+-------------------+------------+------------------+----+-------+-------------+--------------+---------------+
1 row in set (0.00 sec)
mysql>
spawn is that too, seems ok to me!
Re: Fishing
Posted: Mon Sep 28, 2009 8:43 pm
by bolly
you sure it's not fish as the spell name? *scratches head* the entity command i'm linked to is called fish but i can't see how that fires off the spell *pokes about in the source*
Re: Fishing
Posted: Mon Sep 28, 2009 8:51 pm
by bolly
if(type == GetHarvestSpellType()) {
Spell* spell = master_spell_list.GetSpellByName((char*)collection_skill.c_str());
if (spell)
client->GetCurrentZone()->ProcessSpell(spell, client->GetPlayer(), client->GetPlayer()->GetTarget());
This the bad boy? I'm pretty sure it's enumed as upper case Fishing
Re: Fishing
Posted: Mon Sep 28, 2009 8:55 pm
by bolly
hoo ya!! she's fishing ;D

Re: Fishing
Posted: Mon Sep 28, 2009 9:11 pm
by Scatman
Hehe ya that's why I said it was case sensitive. I guess I should've said "Fishing", sorry
