Ximboliex 85 Report post Posted April 6, 2017 (edited) ***SCRIPTS BY @Saeed**** @KONG You can help Please me to verify if the structure is correct since I was not able to test them for technical reasons anyway ... I have added several things. And Others Enjoy! -- Variables PlayerBomb = {} PlayerBomb_ID = #### --- Bomb id (characterinfo.txt) -- Bomb using function function Use_Bomb(cha) local x, y = GetChaPos( cha ) local MonsterID = PlayerBomb_ID local Refresh = 50 local life = 400000000 local bomb = CreateCha( MonsterID , x , y , 145 , Refresh ) SetChaLifeTime( bomb, life ) SetChaAIType( bomb , 0 ) SetChaHost( bomb , cha ) GiveItem( role, 0 , ####, 1 , 4 ) -- Remote Control PlayerBomb[cha] = bomb BickerNotice(cha,"You have placed a bomb at "..math.floor(x/100)..","..math.floor(y/100).."!") end -- Remote function function Bomb_Remote(cha) if(PlayerBomb[cha] ~= nil)then local bomb = PlayerBomb[cha] local skill_id = select_skill(bomb) SetChaAIType(bomb,10) SetChaHost( bomb , nil ) BickerNotice(cha,"Bomb has been triggered!") else BickerNotice(cha,"You don't have any bomb placed anywhere. Remote usage failed!") end end -- Hook to is_friend to harm monsters + players if orginal_friend_check == nil then orginal_friend_check = is_friend is_friend = function (cha1 , cha2) if(GetChaID(cha1) == PlayerBomb_ID)then return 0 else return orginal_friend_check(cha1 , cha2 ) end end end ###Skilleffect.lua### function SkillArea_Circle_bombexplode ( sklv ) local side = 1000 SetSkillRange ( 4 , side ) end function SkillCooldown_bombexplode( sklv ) local Cooldown = 0 return Cooldown end function SkillSp_bombexplode ( sklv ) local sp_reduce =0 return sp_reduce end function Skill_bombexplode_Begin ( role , sklv ) end function Skill_bombexplode_End ( ATKER , DEFER , sklv ) Hp_Endure_Dmg ( DEFER , 1500 ) end ###Characterinfo### #### TNT - Bomb Wooden Barrel 4 5 682 0 1 1 0 0 0 0 0 0 0 0 0 0,0,0 1 310 100 -1 -1 -1 0 0 0 0,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 2,38 2,38 1,11 40 1,0,0 2,5,0 399 0 0 0 0,0,0 1 1 0 0 496,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 100,-1,-1,-1,-1,-1,-1,-1,-1,-1,-1 0,-1,-1,-1,-1,-1,-1,-1,-1,-1 0,-1,-1,-1,-1,-1,-1,-1,-1,-1 0 0 0 0,-1,-1,-1,-1,-1,-1,-1,-1,-1 0,-1,-1,-1,-1,-1,-1,-1,-1,-1 1 1 1000 0 0 1 0 0 20 0 15 0 0 0 10 2 -2 1 10 200 1 1 2000 0 0 0 0 0 0 5 5 5 5 20 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 ###Skillinfo### #### Bomb Explosion 1 -1,10 1,-1 1,-1 1,-1 -1 0 1 0 -1 -1 1 1 1 0 4 2 0 0 4 0 0 SkillSp_bombexplode 0 0 SkillArea_Circle_bombexplode 0 Skill_bombexplode_End 0 0 0 0 0 0 0 0 0 0 0 0 0 0 SkillCooldown_bombexplode 1 1 12 -1 -1 -1 881 0 0 0,0 0,0 -1 -1 -1 0 0 -1 -1 882 -2 0 0 s0127.tga 0 0 Monster Skill Monster Skill 0 0 ##Iteminfo### #### Remote Control bomb 10130005 0 0 0 0 0 0 41 0 0 0 0 0 1 1 1 1 1 1 5000 -1,-2,-2,-2 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 -1,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2,-2 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0,0 0 0,0 0,0 0 0 0 0 0 0 0 0 0 Bomb_Remote 0 0,0,0,0,0,0,0,0 0,0,0,0,0,0,0,0 0,0 0,0 0,0 Remote Control. Need for detone bomb ***Note: you need change icon in the iteminfo line**** Edited April 6, 2017 by Ximboliex 1 Quote Share this post Link to post Share on other sites
MonkeyCode 453 Report post Posted April 6, 2017 You sure @Saeed allowed the release of these scripts? Anyways, for persistence upon updateall: PlayerBomb = {} to PlayerBomb = PlayerBomb or {} for persistence upon updateall and cross-gameserver: PlayerBomb = table.load(...) --serialize For other minor details: if you use bomb to kill someone in Chaos Argent, you wont be getting the kill, GetExp_MKP will be called instead... so you might want to hook it in such a way: local dummyhook = GetExp_MKP function GetExp_MKP(dead, atk) for i,v in pairs PlayerBomb do if v == atk then after_player_kill_player(i, dead) end dummyhook(dead, atk) end Also, I did not see a line of code that cleans player's data such as: PlayerBomb[cha] = nil And finally, per player can set 1 bomb only... So in conclusion, I think these were only mock-up/pseudo codes by @Saeed. So, dont use them. 1 Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted April 6, 2017 Thank's for everting @KONG Quote Share this post Link to post Share on other sites
Yomazu 20 Report post Posted April 6, 2017 Its not the final version of Saeed's Remote bomb. the new one have some functions in AI and to clean bomb var. Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted April 6, 2017 (edited) @Yomazu Can you release it? Edited April 6, 2017 by Ximboliex Quote Share this post Link to post Share on other sites
Rinor 59 Report post Posted April 6, 2017 It's not even the full version. Quote Share this post Link to post Share on other sites
Yomazu 20 Report post Posted April 7, 2017 9 hours ago, Ximboliex said: @Yomazu Can you release it? I can't, need ask Saeed first. Quote Share this post Link to post Share on other sites
Ximboliex 85 Report post Posted April 7, 2017 Ok @Yomazu Quote Share this post Link to post Share on other sites
Saeed 26 Report post Posted May 4, 2017 Well, this is fun lmao 1 Quote Share this post Link to post Share on other sites