'********************************Function F_Freeslots(index) '********************************Dim slotDim countslot=1count=0 Do While slot < 25 If getplayerinvitemnum(index, slot) = 0 Then count = Int(count) + 1 End If slot=Int(slot) + 1 LoopF_Freeslots=Int(count)End Function'********************************Sub Give_Item(index, number, durability)'********************************Dim slotslot = 1 Do While slot < 25 If Getplayerinvitemnum( index, Int( slot ) ) = 0 Then Call SetPlayerInvItemNum(index, Int( slot ), Int( number ) ) Call SetPlayerInvItemDur(index, Int( slot ), Int( durability ) ) Call SetPlayerInvItemValue(index, Int( slot ), Int(0) ) Call SendInventoryUpdate(index, Int(slot) ) slot = 25 End If slot = slot + 1 LoopEnd Sub'********************************Sub Give_Currency(index, number, quantity)'********************************Dim slotDim initialDim finalDim givenslot=1given=0 Do While slot < 25 If Getplayerinvitemnum(index,Int(slot))=Int(number) Then initial = Getplayerinvitemvalue( index, Int( slot ) ) final = Int( initial ) + Int( quantity ) Call setplayerinvitemvalue( index, Int( slot ), Int( final ) ) Call SendInventoryUpdate(index, Int(slot) ) slot = 25 given = 1 End If slot = slot + 1 Loop If given=1 Then slot=25 Else slot=1 End If Do While slot < 25 If Getplayerinvitemnum(index,Int(slot)) = 0 Then Call SetPlayerInvItemNum(index, Int( slot ), Int( number ) ) Call SetPlayerInvItemValue(index, Int( slot ), Int( quantity ) ) Call SetPlayerInvItemDur(index, Int( slot ), 0 ) Call SendInventoryUpdate(index, Int(slot) ) slot = 25 End If slot = slot + 1 Loop End Sub'********************************Function F_Check_Take(index, number, value)'********************************Dim slotslot = 1F_Check_Take =0 Do While slot < 25 If Getplayerinvitemnum( index, Int( slot ) ) = Int( number ) Then If GetPlayerInvItemValue(index, Int( slot ) ) >= Int(value) Then F_Check_Take=1 End If End If slot = slot + 1 LoopEnd Function'********************************Sub Take_Item(index, number, value)'********************************Dim slotDim takenDim initialDim finalslot=1taken=0 Do While Int(slot) < 25 If Int(taken)=0 Then If Getplayerinvitemnum(index,Int(slot)) = Int(number) Then If Int(getplayerinvitemvalue(index, Int(slot))) >= Int(value) Then initial = Int(getplayerinvitemvalue(index, Int(slot) ) ) final = Int(initial) - Int(value) If Int(final) <= 0 Then Call setplayerinvitemnum(index, Int(slot), Int(0) ) Call setplayerinvitemvalue(index, Int(slot), Int(0) ) Call setplayerinvitemdur(index, Int(slot), Int(0) ) Call SendInventoryUpdate(index, Int(slot)) taken=1 Else Call setplayerinvitemvalue(index, Int(slot), Int(final) ) Call SendInventoryUpdate(index, Int(slot) ) taken=1 End If End If End If End If slot = slot + 1 LoopEnd Sub'********************************Sub Baron_Stam_regain(index)'********************************Dim skill_typeDim skill_actionDim stam_totalDim player_lvlskill_type=Trim( GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "SKILL","type") ) If Int(Getvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type), "has_data") ) < 1 Then Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "Exp", Int(0) ) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "level", Int(0)) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "stamina", Int(10)) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "has_data", Int(1)) Call battlemsg(index, "You should return here if you wish to rest", 14, 1) End If player_lvl=Getvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "level")skill_action=Trim(GetVar("scripts\skills\" & skill_type & ".ini", "INDEX","action"))stam_total=5 + Int(player_lvl)Call PutVar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "stamina", Int(stam_total))Call battlemsg(index, "You feel refreshed and ready to " & skill_action & " again.", 14, 1)End Sub'********************************Sub Baron_Uber_skills(index)'********************************'Do not modify this script in any way.'It is provided as is in all goodwill.'There is CONSIDERABLE time spent here.On Error Resume nextDim skill_typeDim skill_numberDim take_totalDim give_totalDim countDim take_countDim take_numDim take_valDim take_msgDim empty_spaceDim take_checkDim needed_itemDim player_weaponDim skill_actionDim currency_checkDim recipe_countDim recipe_totalDim min_lvlDim player_lvlDim player_stamDim recipe_stamDim give_valDim give_numDim give_durDim give_msgDim high_randomiserDim success_chanceDim low_chanceDim high_chanceDim give_expDim new_expDim lvl_expDim next_lvlIf Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "SKILL","has_data")) < 0 ThenCall Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "SKILL","type", "")Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "SKILL","number", 0)Call Putvar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "SKILL","has_data", 1)Call Playermsg(index, "Made skill template for map", 14)Call Playermsg(index, "Credits go to Baron - http://barony.deviantart.com/", 14)End IfRECIPE_COUNT = Int(1)skill_type=Trim( GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "SKILL","type") )recipe_total=Int(GetVar("scripts\skills\" & skill_type & ".ini","INDEX" ,"total_recipes"))'RECIPES ALWAYS HAVE SKILL 1 SELECTED IN MAPEXTRAS AND TOTAL RECIPES IN SKILLS SET TO HIGHEST'NON RECIPES HAVE ANY SKILL SELECTED IN MAPEXTRAS AND TOTAL RECIPES IN SKILLS SET TO 1Do While Int(RECIPE_COUNT) <= Int(recipe_total) If trim(skill_type) <> "" Then skill_number = Int(GetVar("scripts\mapextras\" & GetPlayerMap(index) & ".ini", "SKILL","number")) If Int(recipe_count) > 1 Then skill_number = Int(recipe_count) End If needed_item=Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number),"item_num_needed")) player_weapon=Int( Getplayerinvitemnum(index, Int(getplayerweaponslot(index)) ) ) skill_action=Trim(GetVar("scripts\skills\" & skill_type & ".ini", "INDEX","action")) If Int(needed_item) = Int(player_weapon) Then min_lvl = Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number),"min_level")) If Int(Getvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type), "has_data") ) < 1 Then Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "Exp", Int(0) ) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "level", Int(0)) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "stamina", Int(10)) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "has_data", Int(1)) Call playermsg(index, "You attempt to " & skill_action & " for the first time!", 14) End If player_lvl = Int(Getvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "level")) If Int(min_lvl) <= Int(player_lvl) Then player_stam=Int(getvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "stamina")) recipe_stam=Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number),"stam_taken")) If Int(player_stam) >= Int(recipe_stam) Then take_total = Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number),"take_total")) give_total = Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number),"give_total")) count = Int ( 1 ) take_count = Int ( 0 ) empty_space=F_Freeslots(index) If Int(give_total) <= Int(empty_space) Then Do While count <= Int(take_total) take_num=Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_take_num")) take_val=Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_take_val")) take_check=F_Check_Take(index,take_num,take_val) take_count=take_count + Int(take_check) count=count+1 Loop If Int(take_count) = Int(take_total) Then count = Int ( 1 ) Do While Int(count) <= Int(take_total) take_num=Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_take_num")) take_val=Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_take_val")) take_msg=Trim(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_take_Msg")) Call battlemsg(index, trim(take_msg), 15, 1) Call Take_Item(index, Int(take_num), Int(take_val) ) count=count+1 Loop count = Int ( 1 ) new_exp = 0 Do While Int(count) <= Int(give_total) give_val = Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_give_val")) give_msg = Trim(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_give_msg")) success_chance = Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_base_chance")) low_chance= Int(player_lvl) - Int(min_lvl) + 1 high_chance = Int(player_lvl) - Int(min_lvl) + Int(success_chance) high_randomiser = Int((high_chance + 1) * Rnd) If Int(high_randomiser) <= Int(low_chance) Then If Int(give_val) > 0 Then give_num = Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_give_num")) Call Give_Currency(index, Int(give_num), Int(give_val) ) Call battlemsg(index, Trim(give_msg),10, 1) 'TO HAVE THE SCRIPT AUTO CREATE ALL ITEMS IT CAN ONCE EACH, REMOVE LINE BELOW RECIPE_COUNT= Int(recipe_total) Else give_num = Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_give_num")) give_dur = Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_give_dur")) Call Give_Item(index, give_num, give_dur) Call battlemsg(index, Trim(give_msg),10, 1) 'TO HAVE THE SCRIPT AUTO CREATE ALL ITEMS IT CAN ONCE EACH, REMOVE LINE BELOW RECIPE_COUNT= Int(recipe_total) End If give_exp = 0 + Int(GetVar("scripts\skills\" & skill_type & ".ini", Int(skill_number), Int(count) & "_EXP")) new_exp = 0 + Int(getvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "exp")) + Int(give_exp) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "exp", Int(new_exp)) End If If new_exp=0 Then new_exp=Int(getvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "exp")) End If count=count+1 Loop next_level = Int(player_lvl) + Int(1) lvl_exp = Int(Getvar("experience.ini", "EXPERIENCE", "Exp" & Int(next_level) ) ) Call battlemsg(index,new_exp & " / " & lvl_exp & " For " & next_level & " " & trim(skill_type), 6, 0) If Int(new_exp) >= Int(lvl_exp) and Int(player_lvl) < 100 Then new_exp= 0 + Int(new_exp) - Int(lvl_exp) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "exp", Int(new_exp)) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "level", Int(next_level)) Call battlemsg(index, "Congratulations, you are now level " & Int(next_level) & " in " & trim(skill_type) & "!", 13, 1) End If player_stam = Int(player_stam) - Int(recipe_stam) Call putvar("scripts\charextras\" & GetPlayerName(index) & ".ini", Trim(Skill_type) , "stamina", Int(player_stam)) If Int(recipe_total) = 1 Then RECIPE_COUNT= Int(recipe_total) End If Else If Int(recipe_count) + 1 > Int(recipe_total) and Int(recipe_total) > Int(1) Then Call battlemsg(index, "You have no components to " & skill_action, 12, 1) End If End If Else Call battlemsg(index, "You need more inventory room to continue " & skill_type & ".", 15, 1) End If Else Call battlemsg(index, "You are too tired to " & skill_action & ".", 12, 1) End If Else Call battlemsg(index, "You need to be more skilled to " & skill_action & " here.", 12, 1) End If End If 'This continues off end of item script. Used when empty slot. Elseif errors usually. If Int(needed_item) <> Int(player_weapon) and Int(recipe_count) = 1 Then Call battlemsg(index, "You need to get the right tool to " & skill_action & " here.", 15, 1) End If Else 'Not working. Cant figure out why. Is non essential for the script to work. Call Playermsg(index, "You still need to define a skill for this map", 14) End IfRECIPE_COUNT = Int(recipe_count)+1LoopEnd Sub
Case 0 Call Baron_Uber_skills(index) '<><><><><>Case 1 Call Baron_Stam_regain(index)
[INDEX]Action=MineSkill=MiningSucceeded=MinedRecipe=0Total_recipes=1[1]Min_Level=0Item_Num_Needed=50Stam_Taken=1Take_Total=0Give_total=21_Give_Num=511_Give_Val=01_Give_dur=01_Base_Chance=101_Give_Msg=You mined some copper ore.1_EXP=152_Give_Num=242_Give_Val=12_Give_dur=02_Base_Chance=202_Give_Msg=You break apart a crystal in your mining efforts.2_EXP=25[2]Min_Level=5Item_Num_Needed=50Stam_Taken=1Take_Total=0Give_total=21_Give_Num=521_Give_Val=01_Give_dur=01_Base_Chance=101_Give_Msg=You mined some iron ore.1_EXP=352_Give_Num=242_Give_Val=22_Give_dur=02_Base_Chance=202_Give_Msg=You break apart a crystal in your mining efforts.2_EXP=25
[INDEX]Action=ChopSkill=WoodcuttingSucceeded=CutRecipe=0Total_recipes=1[1]Min_Level=0Item_Num_Needed=86Stam_Taken=1Take_Total=0Give_total=11_Give_Num=371_Give_Val=01_Give_dur=01_Base_Chance=101_Give_Msg=You chop the tree into some wooden logs.1_EXP=25[2]Min_Level=10Item_Num_Needed=86Stam_Taken=1Take_Total=0Give_total=21_Give_Num=481_Give_Val=01_Give_dur=01_Base_Chance=201_Give_Msg=You chop the old tree into some strong wooden logs.1_EXP=502_Give_Num=172_Give_Val=22_Give_dur=02_Base_Chance=102_Give_Msg=You collect some tinderling while chopping the tree.2_EXP=25
[SKILL]type=number=0has_data=1
[SKILL]type=Woodcuttingnumber=1has_data=1
I dont know if it worth using this script now, because if tym adds that check atack thing, this script would have to be redone. and it sucks.
Your uber skill script folder wont download :( can you email or Pm it to me.Couldnt get my script to create the files. I only got the message.
I have problem, I make alchemy, for example I have 3 mandragoras and with them I can make small hp potion and if I have 9 mandragoras I can make large hp potion. What my char will make if I step onto scripted tile with 9 mandragoras? one large potion, 3 small or one small? can I make sth like choose?
Is it possible to use more than 1 skill in one map.for example in map 1 u can fish at the river then walk to the stones and mine?