If somebody wants, I'm thinking of making an incredibly thorough walkthrough of how to create custom scripts, both npc and quest. Just post here and I'll make a new thread, or PM you
If somebody wants, I'm thinking of making an incredibly thorough walkthrough of how to create custom scripts, both npc and quest. Just post here and I'll make a new thread, or PM you
(only reg to ask u this xD)
think you can help me script something like 85 or 95 ring glow but instead it is for when you equip full corp kylin set x,x?
so like.. armor,gloves and boots on and boom glow xD
item ids:
i can normally script anything i try to btu this really got me stumped xD (if you give me something to add to the variable and skilleff (think its those 2) would be gr888 x.x)Code:2549 Corporeal Kylin Armor 2550 Corporeal Kylin Gloves 2551 Corporeal Kylin Boots
can only find guides to add ring glow xD not working for this the way ime trying
So I'm a genius?
Here you go:
Paste this into the bottom of functions.lua
function cha_timer(role, freq, time)
local resume_freq = 5
local now_tick = GetChaParam(role, 1)
local is_role_living = -1
SetChaParam(role, 1, now_tick + freq * time)
--hp»Ø¸´
if math.mod(now_tick, resume_freq) == 0 and now_tick > 0 then
if is_role_living == -1 then
is_role_living = IsChaLiving(role)
end
if is_role_living == 1 then
Resume(role)
end
--end
----ÑÌ»¨Ä;Ã
local el_nj = GetEquipItemP(role,9)
local el_nj_ID= GetItemID (el_nj)
--SystemNotice ( role , "el_nj_ID=="..el_nj_ID )
if el_nj_ID==3669 then
local ure = GetItemAttr(el_nj, ITEMATTR_URE)
--SystemNotice ( role , "ure=="..ure )
local ure_resume = 1000
ure = ure - ure_resume
--SystemNotice ( role , "ure1=="..ure )
SetItemAttr(el_nj, ITEMATTR_URE, ure )
SynChaKitbag(role,13)
if ure <1000 then
RemoveChaItem ( role , 3669 , 1 , 1 , -1, 2 , 1 )
end
end
local Max_xl = GetEquipItemP(role,5)
local Max_xl_ID= GetItemID (Max_xl)
--SystemNotice ( role , "Max_xl_ID=="..Max_xl_ID )
if Max_xl_ID==2980 then
local statelv = 1
local statetime = 1
AddState ( role , role , STATE_ILOVEDAD , statelv , statetime )
-- SystemNotice ( role , "ÄãºÜ°®¸¸Ç×£¬ÎÒÒ²ºÜ°®£¡" )
end
local Dina_xl = GetEquipItemP(role,8)
local Dina_xl_ID= GetItemID (Dina_xl)
local Dina_x2 = GetEquipItemP(role,2)
local Dina_x2_ID= GetItemID (Dina_x2)
if Dina_xl_ID==2577 and Dina_x2_ID==2817 then
local statelv = 1
local statetime = 3600
AddState ( role , role , STATE_BBRING1 , statelv , statetime )
elseif Dina_xl_ID==2578 and Dina_x2_ID==2820 then
local statelv = 1
local statetime = 3600
AddState ( role , role , STATE_BBRING2 , statelv , statetime )
elseif Dina_xl_ID==2579 and Dina_x2_ID==2823 then
local statelv = 1
local statetime = 3600
AddState ( role , role , STATE_BBRING3 , statelv , statetime )
elseif Dina_xl_ID==2580 and Dina_x2_ID==2826 then
local statelv = 1
local statetime = 3600
AddState ( role , role , STATE_BBRING4 , statelv , statetime )
elseif Dina_xl_ID==2581 and Dina_x2_ID==2832 then
local statelv = 1
local statetime = 3600
AddState ( role , role , STATE_BBRING5 , statelv , statetime )
elseif Dina_xl_ID==2582 and Dina_x2_ID==2829 then
local statelv = 1
local statetime = 3600
AddState ( role , role , STATE_BBRING6 , statelv , statetime )
else
local statelv_bbring1 = GetChaStateLv ( role , STATE_BBRING1 )
if statelv_bbring1~=0 then
RemoveState ( role , STATE_BBRING1 )
end
local statelv_bbring2 = GetChaStateLv ( role , STATE_BBRING2 )
if statelv_bbring2~=0 then
RemoveState ( role , STATE_BBRING2 )
end
local statelv_bbring3 = GetChaStateLv ( role , STATE_BBRING3 )
if statelv_bbring3~=0 then
RemoveState ( role , STATE_BBRING3 )
end
local statelv_bbring4 = GetChaStateLv ( role , STATE_BBRING4 )
if statelv_bbring4~=0 then
RemoveState ( role , STATE_BBRING4 )
end
local statelv_bbring5 = GetChaStateLv ( role , STATE_BBRING5 )
if statelv_bbring5~=0 then
RemoveState ( role , STATE_BBRING5 )
end
local statelv_bbring6 = GetChaStateLv ( role , STATE_BBRING6 )
if statelv_bbring6~=0 then
RemoveState ( role , STATE_BBRING6 )
end
end
-----------------------The Strenght in the Heart
local Eric_XZDLL = GetEquipItemP(role,8)
local Eric_XZDLL_ID = GetItemID (Eric_XZDLL)
if Eric_XZDLL_ID == 5827 then
local statelv = 1
local statetime = 3600
AddState ( role , role , STATE_XZDLL , statelv , statetime )
else
local statelv_XZDLL = GetChaStateLv ( role , STATE_XZDLL )
if statelv_XZDLL~=0 then
RemoveState ( role , STATE_XZDLL )
end
end
-----------------------The Strenght in the Heart
end
end
HERE IS THE THING!
local Dina_xl = GetEquipItemP(role,8) ROLE 8 IS ARMOR ROLE 2 IS RING!!! YOU CAN TRY ROLE FROM 1-8 EACH IS ONE PART OF THE BODY
local Dina_xl_ID= GetItemID (Dina_xl)
local Dina_x2 = GetEquipItemP(role,2)
local Dina_x2_ID= GetItemID (Dina_x2)
If this doesnt work, check that the term "bbring" is present in:
skilleffect.txt
skilleffect.lua
itemingo.txt
variable.lua
if you are using latest xmdw files all u need to do is add the function to functions.lua
Add in file:
skilleff.txt
200 Niu Jie 85BB -1 0 State_BBRING1_Add State_BBRING1_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 574 2 0 0 0 0 0 0 0
201 85BB double ring -1 0 State_BBRING2_Add State_BBRING2_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 576 2 0 0 0 0 0 0 0
202 85BB quit hunting -1 0 State_BBRING3_Add State_BBRING3_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 575 2 0 0 0 0 0 0 0
203 Air 85BB-ring -1 0 State_BBRING4_Add State_BBRING4_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 573 2 0 0 0 0 0 0 0
204 85BB-ring seal -1 0 State_BBRING5_Add State_BBRING5_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 572 2 0 0 0 0 0 0 0
205 85BB-ring heal -1 0 State_BBRING6_Add State_BBRING6_Rem 3 0 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 -1 0 0 0 577 2 0 0 0 0 0 0 0
variable.lua
STATE_BBRING1 = 200
STATE_BBRING2 = 201
STATE_BBRING3 = 202
STATE_BBRING4 = 203
STATE_BBRING5 = 204
STATE_BBRING6 = 205
skilleffect.lua:
-----BBRING1
function State_BBRING1_Add ( role , statelv )
local strsb_dif = 10
local strsb = StrSb( role ) + strsb_dif
SetCharaAttr( strsb , role , ATTR_STATEV_STR )
local consb_dif = 8
local consb = ConSb( role ) + consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local defsb_dif = 100
local defsb = DefSb(role) + defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local fleesb_dif = 10
local fleesb = FleeSb(role) + fleesb_dif
SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )
local hitsb_dif = 10
local hitsb = HitSb(role) + hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local hrecsb_dif = 6
local hrecsb = HrecSb(role) + hrecsb_dif
SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
local pdef_dif = 4
local pdef = ResistSb(role) + pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
function State_BBRING1_Rem ( role , statelv )
local strsb_dif = 10
local strsb = StrSb( role ) - strsb_dif
SetCharaAttr( strsb , role , ATTR_STATEV_STR )
local consb_dif = 8
local consb = ConSb( role ) - consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local defsb_dif = 100
local defsb = DefSb(role) - defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local fleesb_dif = 10
local fleesb = FleeSb(role) - fleesb_dif
SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )
local hitsb_dif = 10
local hitsb = HitSb(role) - hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local hrecsb_dif = 6
local hrecsb = HrecSb(role) - hrecsb_dif
SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
local pdef_dif = 4
local pdef = ResistSb(role) - pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
-----BBRING2---85BBЛ«Ѕд
function State_BBRING2_Add ( role , statelv )
local strsb_dif = 8
local strsb = StrSb( role ) + strsb_dif
SetCharaAttr( strsb , role , ATTR_STATEV_STR )
local agisb_dif = 3
local agisb = AgiSb( role ) + agisb_dif
SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
local consb_dif = 8
local consb = ConSb( role ) + consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local defsb_dif = 80
local defsb = DefSb(role) + defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local fleesb_dif = 30
local fleesb = FleeSb(role) + fleesb_dif
SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )
local hitsb_dif = 10
local hitsb = HitSb(role) + hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local hrecsb_dif = 8
local hrecsb = HrecSb(role) + hrecsb_dif
SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
local pdef_dif = 4
local pdef = ResistSb(role) + pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
function State_BBRING2_Rem ( role , statelv )
local strsb_dif = 8
local strsb = StrSb( role ) - strsb_dif
SetCharaAttr( strsb , role , ATTR_STATEV_STR )
local agisb_dif = 3
local agisb = AgiSb( role ) - agisb_dif
SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
local consb_dif = 8
local consb = ConSb( role ) - consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local defsb_dif = 80
local defsb = DefSb(role) - defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local fleesb_dif = 30
local fleesb = FleeSb(role) - fleesb_dif
SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )
local hitsb_dif = 10
local hitsb = HitSb(role) - hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local hrecsb_dif = 8
local hrecsb = HrecSb(role) - hrecsb_dif
SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
local pdef_dif = 4
local pdef = ResistSb(role) - pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
-----BBRING3---85BBБФЅд
function State_BBRING3_Add ( role , statelv )
local agisb_dif = 4
local agisb = AgiSb( role ) + agisb_dif
SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
local dexsb_dif = 8
local dexsb = DexSb( role ) + dexsb_dif
SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
local consb_dif = 6
local consb = ConSb( role ) + consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local defsb_dif = 75
local defsb = DefSb(role) + defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local fleesb_dif = 15
local fleesb = FleeSb(role) + fleesb_dif
SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )
local hitsb_dif = 30
local hitsb = HitSb(role) + hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local hrecsb_dif = 6
local hrecsb = HrecSb(role) + hrecsb_dif
SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
local pdef_dif = 3
local pdef = ResistSb(role) + pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
function State_BBRING3_Rem ( role , statelv )
local agisb_dif = 4
local agisb = AgiSb( role ) - agisb_dif
SetCharaAttr( agisb , role , ATTR_STATEV_AGI )
local dexsb_dif = 8
local dexsb = DexSb( role ) - dexsb_dif
SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
local consb_dif = 6
local consb = ConSb( role ) - consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local defsb_dif = 75
local defsb = DefSb(role) - defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local fleesb_dif = 15
local fleesb = FleeSb(role) - fleesb_dif
SetCharaAttr( fleesb , role , ATTR_STATEV_FLEE )
local hitsb_dif = 30
local hitsb = HitSb(role) - hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local hrecsb_dif = 6
local hrecsb = HrecSb(role) - hrecsb_dif
SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
local pdef_dif = 3
local pdef = ResistSb(role) - pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
-----BBRING4---85BBєЅЅд
function State_BBRING4_Add ( role , statelv )
local consb_dif = 8
local consb = ConSb( role ) + consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local stasb_dif = 10
local stasb = StaSb( role ) + stasb_dif
SetCharaAttr( stasb , role , ATTR_STATEV_STA )
local defsb_dif = 75
local defsb = DefSb(role) + defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local hitsb_dif = 30
local hitsb = HitSb(role) + hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local hrecsb_dif = 4
local hrecsb = HrecSb(role) + hrecsb_dif
SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
local srecsb_dif = 2
local srecsb = SrecSb(role) + srecsb_dif
SetCharaAttr( srecsb , role , ATTR_STATEV_SREC )
local pdef_dif = 3
local pdef = ResistSb(role) + pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
function State_BBRING4_Rem ( role , statelv )
local consb_dif = 8
local consb = ConSb( role ) - consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local stasb_dif = 10
local stasb = StaSb( role ) - stasb_dif
SetCharaAttr( stasb , role , ATTR_STATEV_STA )
local defsb_dif = 75
local defsb = DefSb(role) - defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local hitsb_dif = 30
local hitsb = HitSb(role) - hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local hrecsb_dif = 4
local hrecsb = HrecSb(role) - hrecsb_dif
SetCharaAttr( hrecsb , role , ATTR_STATEV_HREC )
local srecsb_dif = 2
local srecsb = SrecSb(role) - srecsb_dif
SetCharaAttr( srecsb , role , ATTR_STATEV_SREC )
local pdef_dif = 3
local pdef = ResistSb(role) - pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
-----BBRING5---85BB·вУЎЅд
function State_BBRING5_Add ( role , statelv )
local consb_dif = 7
local consb = ConSb( role ) + consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local stasb_dif = 10
local stasb = StaSb( role ) + stasb_dif
SetCharaAttr( stasb , role , ATTR_STATEV_STA )
local defsb_dif = 55
local defsb = DefSb(role) + defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local hitsb_dif = 30
local hitsb = HitSb(role) + hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local srecsb_dif = 8
local srecsb = SrecSb(role) + srecsb_dif
SetCharaAttr( srecsb , role , ATTR_STATEV_SREC )
local pdef_dif = 2
local pdef = ResistSb(role) + pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
function State_BBRING5_Rem ( role , statelv )
local consb_dif = 7
local consb = ConSb( role ) - consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local stasb_dif = 10
local stasb = StaSb( role ) - stasb_dif
SetCharaAttr( stasb , role , ATTR_STATEV_STA )
local defsb_dif = 55
local defsb = DefSb(role) - defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local hitsb_dif = 30
local hitsb = HitSb(role) - hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local srecsb_dif = 8
local srecsb = SrecSb(role) - srecsb_dif
SetCharaAttr( srecsb , role , ATTR_STATEV_SREC )
local pdef_dif = 2
local pdef = ResistSb(role) - pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
-----BBRING6---85BBКҐЅд
function State_BBRING6_Add ( role , statelv )
local dexsb_dif = 2
local dexsb = DexSb( role ) + dexsb_dif
SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
local consb_dif = 3
local consb = ConSb( role ) + consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local stasb_dif = 12
local stasb = StaSb( role ) + stasb_dif
SetCharaAttr( stasb , role , ATTR_STATEV_STA )
local defsb_dif = 55
local defsb = DefSb(role) + defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local hitsb_dif = 30
local hitsb = HitSb(role) + hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local srecsb_dif = 6
local srecsb = SrecSb(role) + srecsb_dif
SetCharaAttr( srecsb , role , ATTR_STATEV_SREC )
local pdef_dif = 2
local pdef = ResistSb(role) + pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
function State_BBRING6_Rem ( role , statelv )
local dexsb_dif = 2
local dexsb = DexSb( role ) - dexsb_dif
SetCharaAttr( dexsb , role , ATTR_STATEV_DEX )
local consb_dif = 3
local consb = ConSb( role ) - consb_dif
SetCharaAttr( consb , role , ATTR_STATEV_CON )
local stasb_dif = 12
local stasb = StaSb( role ) - stasb_dif
SetCharaAttr( stasb , role , ATTR_STATEV_STA )
local defsb_dif = 55
local defsb = DefSb(role) - defsb_dif
SetCharaAttr( defsb , role , ATTR_STATEV_DEF )
local hitsb_dif = 30
local hitsb = HitSb(role) - hitsb_dif
SetCharaAttr( hitsb , role , ATTR_STATEV_HIT )
local srecsb_dif = 6
local srecsb = SrecSb(role) - srecsb_dif
SetCharaAttr( srecsb , role , ATTR_STATEV_SREC )
local pdef_dif = 2
local pdef = ResistSb(role) - pdef_dif
SetCharaAttr( pdef , role , ATTR_STATEV_PDEF )
ALLExAttrSet(role)
end
what 0.o
can you help me create an npc with function to check player level or str?
example :
in function = function check_str(....,....)
if str > 5 and str < 20 then group=weak_str
else if str > 20 and str < 40 then group=medium_str
.........................................
in npc file = function npc_judge ()
InitTrigger()
TriggerCondition( 1, check_str, medium_str )
TriggerAction( 1, GiveItem, 5337, 1, 4 )
TriggerFailure( 1, JumpPage, 3 )
Talk( 3, "you must have str more than 20 to get this item" )
Text( 1, "you want item?", MultiTrigger, GetMultiTrigger(), 1)..............................................
..............................................................
or something like that, that will check player str or def to get something, help please... :)
Im trying to be a better coder so maybe yea!
Please can u help me how to make Exchange NPC have thos :
-Exchange 99 Fairy Coin to 10m
-Exchange 15 eleven signet to 10m
-Exchange 5 royal signet to 10m
and other one :
-Exchange 60 Wood to 1 Kal Runestone
-Exchange 60 sashimi to 1 Kal Runestone
-Exchange 60 iron ore to 1 Kal Runestone
-Exchange 5 kal runestone to 1 Morph Runestone
and other one :
-Exchange 3 kal's to Crown of Decedent
-Exchange 1 morph runenstone to grand prize
-Exchange 5 morph runenstone to full death set crus
-Exchange 5 morph runenstone to full death set Champion
-Exchange 5 morph runenstone to full death set voyager
-Exchange 5 morph runenstone to full death set sharpshooter
-Exchange 5 morph runenstone to full death set Cleric
-Exchange 5 morph runenstone to full death set Seal Master
Please help me
can you help me i have problems i dont have animations on some of my wings and fairys can you share your files for that,tnx....i only have lvl 1 fairies animation except mordo and some wings.and also effect for the gems tnx.
hi man and tnx i need lv85 ring!!!!!!!