2 Questions

03/04/2013 14:01 ajstyles316#1
Is it possible to make it so you cant use any Spells or Skills in a specific map?

&

How can you make it so that if you buy an item with say BoundCps that those items cant be traded?
03/04/2013 14:35 shadowman123#2
1st : Sure you can.. just go to Handle.cs ( if u are using Impulse based Sources ) .. then search for the skill ID that u would like to Deactivate and write this code ..

if(attacker.MapID == // ID of map u would like the skill to be activated in) { return; } .. Ta da

what this code do is .. when the player become in map u deactivated this skill in and trying to use it nothing will happen and if u would like smthing Professional send the client Message telling him that he cant use this spell at this map

2nd : ConquerItem Packet got offset to determine if the item u have is bound or not .. when u get item set this offset to 1 and this item will be saved in the database .. when u login into server this Item will be loaded and u should Re-Send him ConquerItem Packet again
03/04/2013 16:38 ajstyles316#3
Cheers got the buy bound items working fine now, For the spells & skills i was wanting to to dissallow all skills & spells in the specific map rather than just 1, Its for an event map where monster kills only count while using a specific item then realised they could still use skills ect to aoe groups of mobs hence needing to make it so ya cant use any skills or spells at all in that map.
03/04/2013 17:03 shadowman123#4
which source u are using ?
03/04/2013 17:47 ajstyles316#5
Ahh shoot sorry thought id written it, Im using a Trinity base source.
03/04/2013 19:06 Super Aids#6
It's a flag to the map that does it, send with the MapInfoPacket.
03/04/2013 22:49 abdoumatrix#7
i think there r many ways to disallow skill

u can search for that in ur handle.cs

PHP Code:
public static void ReceiveAttack 
no skills allowed
PHP Code:
 if (attacker.MapID == //MapID)
            
{
                        if (
spell != null)
                        {
                            
attacker.Owner.Send(new Message("Skills isn't allowed!"System.Drawing.Color.Red0x7dc));
                            return;
                        }

this to make some spell
PHP Code:
 if (attacker.MapID == //MapID)
            
{
                        if (!
Constants.AllowedSpell.Contains(spell.ID) || spell != null)
                        {
                            
attacker.Owner.Send(new Message("Only Some Skills is allowed!"System.Drawing.Color.Red0x7dc));
                            return;
                        }

and just add this at Serverbase/constants
which can u just add allowed skill
PHP Code:
public static readonly List<ushortAllowedSpell = new List<ushort> { 0x4150x4160x17700x288d0x2af80x2afd700 }; 
Try This it may do the job