Jump to content

Billy

Community
  • Content Count

    120
  • Joined

  • Days Won

    28

Posts posted by Billy


  1. Done using triggers, add these functions/triggers to your db, then you can just select chaospoint from character and order by descending for rankings.

    (split function is not mine, found on stackoverflow)

    I havent fully tested, so let me know if there are any issues.

     

     

    (Updated to fix dupe bug when user doesnt have a medal of valor)

    CHAOS.sql

    • Like 2

  2. I can see 2 ways of doing this:

     

    1)

    Load all players inventorys, decrypt and check medal of valor parameters, then sort. But this would be very inefficient.

     

    2)

    Record all changes to chaos points ingame and write to file, load this file on the webpage.

     

     

     

    Actually, you could probably use SQL triggers to record it, I'll try that tomorrow

    • Like 1

  3. Find its line in skillinfo.bin, should be something like this:

    0455	Beast Legion Smash	1	8,3	1,-1	1,2	1,27;2,825;2,845;2,2367;2,2549	-1	2	1	0	-1	-1	0	1	1	0	4	2	0	0	4	0	0	SkillSp_ShouWangS	0	0	SkillArea_Circle_ShouWangS	0	Skill_ShouWangS_End	0	0	0	0	0	0	0	0	0	0	0	0	0	0	SkillCooldown_ShouWangS	1	1	12	0	50	-1	102	0	-1	0,0	0,0	-1	-1	-1	0	0	51	-1	0	-1	938	0	s0455.tga	0	0	Burst huge amount of energy to surrounding enemies, and decreasing the enemy's speed	does 500 damage to surrounding enemies. Damage is raised by 30 per skill level	Static 125 SP usage	0	

    Column 6 (1,2) means that you must have a weapon of type 2 (greatsword) equipped.

     

    Column 7 (1,27;2,825;2,845;2,2367;2,2549) means you must have armour type 27 (tattoo) OR armour with ID 825/845/2367/2549 (kylin/bd/corp kylin/corp bd)

     

    Changing column 6 to 1,-1 means you no longer have the greatsword requirement, and doing the same for column 7 means you dont need the tatoo.

     

     

    If you wanted to force them to have dual swords on to use the skill, you would change column 5 (left hand) and 6 (right hand) to 1,1

     

    • Like 1

  4. depends what you are tying to do: if you want it to only work when fused, then just remove it.

     

    If you want it to work when fused or unfused in any combination, add it to your if statements, eg:

     

    if body_gem_id ~= 3494 and body_gem_id ~= 3498 and body_gem_id ~= 3502 and body_gem_id ~= 3506 and body_gem_id ~= 3510 and body_gem_id ~= 3514 and Body_ID ~= 3494 and Body_ID ~= 3498 and Body_ID ~= 3502 and Body_ID ~= 3506 and Body_ID ~= 3510 and Body_ID ~= 3514 then
    	return 0
    end
    
    

    (you would do that for each part)

     

     

    If you wanted either the complete set to be fused, or the complete set unfused, you would have 2 blocks of if statements.

     

     

    Personally I dont like doing set glows that way, and use this instead:

     

    • Like 1

  5. It disappears because you only added it for 3600 seconds. If you add it for 0 seconds then the effect stays until removed.

    The corals are:

     

    9172    Unique Strike Coral    
    9173    Unique Thunder Coral  
    9174    Unique Wind Coral    
     

    9311    Jack Strike Coral (Permanent)
    9312    Jack Thunder Coral (Permanent)
    9313    Jack Wind Coral (Permanent)  

     

    The unique ones have no stats, the jack ones have some stats.

     

     

    Heres the handler I was using for effects :

     

     


  6. Allows easy addition of set glows/effects using tables.

     

    eg:

    {
    				State = STATE_BBRING1,
    				Fusable = false,
    				AllowApparelGlow = false,
    				SpecialCheck = nil,
    				Effects = {
    					Kylin = false,
    					BlackDragon = false,
    					Death = true,
    					Chaos = false,
    				},
    				ItemID = nil,
    				Slot = nil,
    				Equips = {
    					Head = nil ,
    					Armour = {2817},
    					Boots = nil,
    					Gloves = nil,
    					LeftHand = nil,
    					RightHand = nil,
    					LeftRing = nil,
    					RightRing = {2577},
    					Necklace = nil,
    				},
    				Apparels = {
    					Head = nil,
    					Armour = nil,
    					Gloves = nil,
    					Boots  = nil,  
    					LeftHand = nil,
    					RightHand = nil,
    				},
    			},

    When the player has 2817 (SS death torso) and 2577 (hell feather) , they gain the ss boss ring glow, and the death effect (exp loss reduction).

     

    Also supports calling a function to check if the state is valid using SpecialCheck , eg have a state that is only added to VIP members:

     

    {
    		State = 234,
    		Fusable = false,
    		AllowApparelGlow = false,
    		SpecialCheck = VIP.CheckVIP,
    		Effects = {
    			Kylin = false,
    			BlackDragon = true,
    			Death = false,
    			Chaos = false,
    		},
    		ItemID = nil,
    		Slot = nil,
    		Equips = {
    			Head = nil,
    			Armour = nil,
    			Gloves = nil,
    			Boots = nil,
    			LeftHand = nil,
    			RightHand = nil,
    			LeftRing = nil,
    			RightRing = nil,
    			Necklace =nil,
    		},
    		Apparels = {
    			Head = nil,
    			Armour = nil,
    			Gloves = nil,
    			Boots  = nil,  
    			LeftHand = nil,
    			RightHand = nil,
    		},
    	},

     

     

    Before using, read the install instructions, and make sure to remove any tables you are not using.

     

    Updated:

    Added option to only allow glow if certain apparels are used (or item is unfused)

     

    Updated Link (12/08/16):

    http://pastebin.com/4KR02HLE

     

    • Like 3

  7. You should change the corals to be tables rather than just one ID, iirc in top2 there were 2 sets of intimate corals, one with stats and one without (I think the one with stats were jacks corals?)

     

    Also you should consider using tables for set effects(kylin/bd/chaos/death) and glows  (death/95 glows etc), and moving them out of cha_timer and putting them somewhere like exattrcheck (I started this somewhere, only issue is that in order to have the glow reliant on an item in inventory, you would need to also hook elsewhere, probably on damage taken)


  8. Checks each slot in bag. If that slot has an itme that is type 59 (fairy) then it checks the fairy level. If the fairy level is higher than 48, then stamina is set to 0. Looks like it is a script to prevent people having cheated fairys with high stats (but doesnt prevent people cheating in fairys with other stats on them, like def/pr/max etc, so isnt really a useful script tbh)


  9. @KONG

    1) The entire system takes 8 pages no matter how many items there are. 

    each time you press next/previous a counter is incremented/decremented by 1, and you are redirected back to the same page

    Each item has a number (1-6) on each page

    when you click the item, if it exists you are redircted to a blank page, if it doesnt exist you are sent back to the list page without changing the counter

    On the blank page, your counter is multiplied by 6 and the number assigned to the link you clicked added to it, and then the talk is generated from there.

     

    So you can have any number of items in the system (up to whatever the limit in lua tables is)

     

    2)It loops onto the "next" page, which is the same page with the counter incremented by 1, items with ID between (counter *6) and ((counter + 1)*6 -1) are displayed at once

     

    3)Yes, these are transfered and displayed

     

    4) Thanks :)

    • Like 1

  10. function FixInv(role)
    	for i = 0,47 do
    		local item = GetChaItem(role,2,i)
    		local ID = GetItemID(item)
    		local name = GetItemName(ID)
    		if ID ~= 0 and name == "Unknown" then
    			SystemNotice(role,"Removed bugged item at slot "..i)
    			RemoveChaItem ( role , ID , 1 , 2 , i, 2 , 1 , 1 )
    		end
    	end
    	SynChaKitbag(role,13)
    end

    I havent tested this, but it should work. You may need to change "Unknown" if the name of an undefined item is different on your GS.

     

    Hook that somewhere, probably on ExAttrCheck is best as it would run as soon as the player logs in.

     

    • Like 2

  11. Unlike my other one, this one is based on users rather than admins.

    Any player on the server can submit an item to the auction.

    Each player can only have 1 auction active.

    (Note, in the second video I forgot to enable the seller actually getting their gold, after the auction is over,the seller clicks "claim items" to get their gold.)

     

     

     

     

    Features:

    "Infinitely" expandable (only limited by table size)

    Easy to use

    Claiming items requires space in bag

    Claiming gold requires less than 2b gold (checks for overflow, will give at most the differance between your gold and 2b)

    Currently, the entire system only takes  7  8 pages off the npc (for any amount of auctions running at once)

    Supports item attributes

    Bought items/gold from selling/refunded gold from not winning are claimed at the npc

     

    Future:

    Make the next/previous buttons disappear if there isnt a next/previous page (currently they just redirect back to the current page if that is the case)

    Allow more than 1 auction per person, and have a menu of all a persons auctions if they want to withdraw. (wont do this, as i think it would be spammed)

    Have a menu of bought items to claim, rather than claiming all at once.

    Named attributes ( str/acc /con etc )rather than just the ID (26/28/29 etc)

    Add different descriptions depending on the item type

     

     

     

     

     

    Updated: Tided up the info page a bit:

    LKm9wFn.png 

    • Like 7
×
×
  • Create New...