Jump to content
Sign in to follow this  
BotPRO

Altar of the Black Dragon

Recommended Posts

We all know that even with the official servers at the altar of the black dragon, imposed for 5 seals, 4 types, recently I was wondering how to do that would be on the altar was not for 5 , and let 50.
And now tell. I will show the example with the NPC.

 

Put NPC.

resource\garner\garnernpc.txt

Spoiler

--by BotPRO

147 Test NPC 1 103 4 224100,278400 224100,278400 180 Argent City 8 0 test_npc    0
 

 

Prescribe it function.

resource\script\MisScript\NpcScript01-08.lua

Spoiler

--by BotPRO

function test_npc ()

 Talk( 1, "I you can get BD altar with 50 stamps on it." )
 Text( 1, "Get", BDAltar, 1)
 Text( 1, "Go away", CloseTalk )    

end

 

Add a variable BDAltar in  function MsgProc( character, npc, rpk, page, trade, missionlist, exchangeData ).

resource\script\MisSdk\NpcSdk.lua

Spoiler

--by BotPRO

elseif item.func == BDAltar then
                      return BDAltar(character)

 

Add a function BDAltar.

resource\script\calculate\forge.lua

Spoiler

--by BotPRO

function BDAltar (role, Item )
    local Item_CanGet = GetChaFreeBagGridNum ( role )
    if Item_CanGet <1 then
        SystemNotice(role ,"Requires 1 free slot in Your inventory to get the altar of the Black Dragon.")
        UseItemFailed ( role )
        return
    end
    local r1,r2 =MakeItem ( role , 266  , 1 , 4 )
    local Item_BDAltar = GetChaItem ( role , 2 , r2 )
    

    local str_BDAltar = GetItemAttr( Item_BDAltar ,ITEMATTR_VAL_STR )
    local con_BDAltar = GetItemAttr( Item_BDAltar ,ITEMATTR_VAL_CON )
    local agi_BDAltar = GetItemAttr( Item_BDAltar ,ITEMATTR_VAL_AGI )
    local dex_BDAltar = GetItemAttr( Item_BDAltar ,ITEMATTR_VAL_DEX )


    
    str_JLone    = -45
    con_JLone = -45
    agi_JLone    = -45
    dex_JLone = -45


    
    SetItemAttr ( Item_BDAltar ,ITEMATTR_VAL_STR , str_JLone )
    SetItemAttr ( Item_BDAltar ,ITEMATTR_VAL_CON , con_JLone )
    SetItemAttr ( Item_BDAltar ,ITEMATTR_VAL_AGI , agi_JLone )
    SetItemAttr ( Item_BDAltar ,ITEMATTR_VAL_DEX , dex_JLone)
    RefreshCha(role)

    
    
end

 

What happened ?
Yes, that's what.

Bez_ymeny_1.jpg

 

P.S I gave you the basis, checks of all sorts themselves prikruchivayte, can be a lot of fun to do in my example.

Please forgive me for my English.

Share this post


Link to post
Share on other sites

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.   Restore formatting

  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.

Sign in to follow this  

×
×
  • Create New...