Jump to content
MakeWebGames

Recommended Posts

Posted

Re: [Request] Secondary Weapon For V2

What are u talking about? The script allows a Primary and Secondary weapon for V2... If u don't have then u either got screwed buying the codes or u just have an illegal copy... but hey thats all u

Posted

Re: [Request] Secondary Weapon For V2

 

Unless he has V1 Kaotic. But i doubt it-

Topic says V2 so im on point there... I mean if he has V1 and is calling it V2 then im wrong... and so is he

Posted

Re: [Request] Secondary Weapon For V2

FYI, I have a legal version of the script, I think that I explained everything incorrectly. I want it so that you can only equip certain weapons as primary, and certain weapons as secondary like in TC.

E.G. In TC the Steyr AUG can only be equipped as a primary weapon, and the Magnum can only be equipped as a secondary weapon.

Posted

Re: [Request] Secondary Weapon For V2

You'll need to modify the attack script in order to be able to use that secondary weapon.

I personally don't touch mccodes attack script because I have looked at it in the past and I couldn't make sense of it.

Otherwise I'd offer to install the Horizons style equipment mod for ya. lol ;)

Posted

Re: [Request] Secondary Weapon For V2

The attack script does allow you to use secondary weapons...

Rocky Horror, what you need to do is restrict the weapons from primary/secondary in the equip_weapon file. The easiest way would be to organize your primary/secondary weapons into different item types and then use that to do your restrictions. If you need more help, let me know.

Posted

Re: [Request] Secondary Weapon For V2

 

The attack script does allow you to use secondary weapons...

Rocky Horror, what you need to do is restrict the weapons from primary/secondary in the equip_weapon file. The easiest way would be to organize your primary/secondary weapons into different item types and then use that to do your restrictions. If you need more help, let me know.

I have looked at equip_weapon.php and do not know what to change, any help would be appreciated. I will try and figure it out, though I probably won't get anywhere.

Posted

Re: [Request] Secondary Weapon For V2

I could be wrong, but if you add a new column to items for secondary weapons, wouldn't attack need to be modified to look for that new column?

Like I said, I could be wrong...

I suppose if you add in a flag to the items table for primary/secondary and use the weapons column for the weapons strength, you could sidestep that.

Posted

Re: [Request] Secondary Weapon For V2

 

I could be wrong, but if you add a new column to items for secondary weapons, wouldn't attack need to be modified to look for that new column?

Like I said, I could be wrong...

I suppose if you add in a flag to the items table for primary/secondary and use the weapons column for the weapons strength, you could sidestep that.

This is already implemented in v2, there are are three equip fields: equip_primary, equip_secondary, and equip_armor. The attack script uses these already so there is no need to add anything to the items table.

 

I have looked at equip_weapon.php and do not know what to change, any help would be appreciated. I will try and figure it out, though I probably won't get anywhere.

in equip_weapon.php find the line:

Please choose the slot to equip {$r['itmname']} to, if there is already a weapon in that slot, it will be removed back to your inventory.

.
.
.
<input type='submit' value='Equip Weapon' /></form>

 

replace that with:

   Please choose the slot to equip {$r['itmname']} to, if there is already a weapon in that slot, it will be removed back to your inventory.
";
   if($r['itmtype']==primary_type)
   {
       print"<input type='radio' name='type' value='equip_primary' checked='checked' /> Primary< />";
   }
   elseif($r['itmtype'] == secondary_type)
   {
       print"<input type='radio' name='type' value='equip_secondary'  /> Secondary
";
   }
   else
   {
       print"error";
   }
   print"<input type='submit' value='Equip Weapon' /></form>";

 

change primary_type with your item type id for primary weapons, and secondary_type with the item type id for secondary weapons.

 

I have not tested this, but it should give you what you're looking for.

Posted

Re: [Request] Secondary Weapon For V2

Ah yes, paralem, that makes sense.

I tend to think in terms of expandability. For instance, making it so that you could have any number of item types as secondary weapons instead of tying code to one particular item type. In that scenario, it would make sense to added a secondary_weapon field to items table. Any item/item_type with a secondary_weapon flag would be an equipable item_type.

That would allow a bit more flexibility.

But going for using the item_type itself works too. Good job ;)

Posted

Re: [Request] Secondary Weapon For V2

 

I could be wrong, but if you add a new column to items for secondary weapons, wouldn't attack need to be modified to look for that new column?

Like I said, I could be wrong...

I suppose if you add in a flag to the items table for primary/secondary and use the weapons column for the weapons strength, you could sidestep that.

This is already implemented in v2, there are are three equip fields: equip_primary, equip_secondary, and equip_armor. The attack script uses these already so there is no need to add anything to the items table.

 

I have looked at equip_weapon.php and do not know what to change, any help would be appreciated. I will try and figure it out, though I probably won't get anywhere.

in equip_weapon.php find the line:

Please choose the slot to equip {$r['itmname']} to, if there is already a weapon in that slot, it will be removed back to your inventory.

.
.
.
<input type='submit' value='Equip Weapon' /></form>

 

replace that with:

   Please choose the slot to equip {$r['itmname']} to, if there is already a weapon in that slot, it will be removed back to your inventory.
";
   if($r['itmtype']==primary_type)
   {
       print"<input type='radio' name='type' value='equip_primary' checked='checked' /> Primary< />";
   }
   elseif($r['itmtype'] == secondary_type)
   {
       print"<input type='radio' name='type' value='equip_secondary'  /> Secondary
";
   }
   else
   {
       print"error";
   }
   print"<input type='submit' value='Equip Weapon' /></form>";

 

change primary_type with your item type id for primary weapons, and secondary_type with the item type id for secondary weapons.

 

I have not tested this, but it should give you what you're looking for.

Thanks a lot for your help!

Posted

Re: [Request] Secondary Weapon For V2

I am sorry to be a nuisance, though I just noticed that it keeps saying error, rather than the other two options. I will look into it and see if I can figure it out.

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...