Jump to content

DR4LUC0N

Members
  • Posts

    135
  • Joined

  • Last visited

Posts posted by DR4LUC0N

  1. So I just installed VPS and when using SDE to connect to servers database I get a few errors, could someone help?

    Here's the error log

    Quote

    --------------          Message          --------------
    Session.connect: System.IO.IOException: End of IO Stream Read
       at Tamir.SharpSsh.jsch.IO.getByte(Byte[] array, Int32 begin, Int32 length)
       at Tamir.SharpSsh.jsch.Session.read(Buffer buf)
       at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
    --------------        Stack trace        --------------
       at GrfToWpfBridge.Application.DefaultErrorHandler._reportAnyManagedExceptions(String message, Exception exception, ErrorLevel errorLevel)
       at GrfToWpfBridge.Application.DefaultErrorHandler.Handle(Exception exception, ErrorLevel errorLevel)
       at SDE.View.Dialogs.FtpLogin._buttonExplore_Click(Object sender, RoutedEventArgs e)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at System.Windows.Controls.Button.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Window.ShowHelper(Object booleanBox)
       at System.Windows.Window.Show()
       at System.Windows.Window.ShowDialog()
       at SDE.View.SdeEditor._buttonSftp_Click(Object sender, RoutedEventArgs e)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs e)
       at System.Windows.Controls.Primitives.ButtonBase.OnClick()
       at System.Windows.Controls.Button.OnClick()
       at System.Windows.Controls.Primitives.ButtonBase.OnMouseLeftButtonUp(MouseButtonEventArgs e)
       at System.Windows.UIElement.OnMouseLeftButtonUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.ReRaiseEventAs(DependencyObject sender, RoutedEventArgs args, RoutedEvent newEvent)
       at System.Windows.UIElement.OnMouseUpThunk(Object sender, MouseButtonEventArgs e)
       at System.Windows.Input.MouseButtonEventArgs.InvokeEventHandler(Delegate genericHandler, Object genericTarget)
       at System.Windows.RoutedEventArgs.InvokeHandler(Delegate handler, Object target)
       at System.Windows.RoutedEventHandlerInfo.InvokeHandler(Object target, RoutedEventArgs routedEventArgs)
       at System.Windows.EventRoute.InvokeHandlersImpl(Object source, RoutedEventArgs args, Boolean reRaised)
       at System.Windows.UIElement.RaiseEventImpl(DependencyObject sender, RoutedEventArgs args)
       at System.Windows.UIElement.RaiseTrustedEvent(RoutedEventArgs args)
       at System.Windows.UIElement.RaiseEvent(RoutedEventArgs args, Boolean trusted)
       at System.Windows.Input.InputManager.ProcessStagingArea()
       at System.Windows.Input.InputManager.ProcessInput(InputEventArgs input)
       at System.Windows.Input.InputProviderSite.ReportInput(InputReport inputReport)
       at System.Windows.Interop.HwndMouseInputProvider.ReportInput(IntPtr hwnd, InputMode mode, Int32 timestamp, RawMouseActions actions, Int32 x, Int32 y, Int32 wheel)
       at System.Windows.Interop.HwndMouseInputProvider.FilterMessage(IntPtr hwnd, WindowMessage msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at System.Windows.Interop.HwndSource.InputFilterMessage(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndWrapper.WndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam, Boolean& handled)
       at MS.Win32.HwndSubclass.DispatcherCallbackOperation(Object o)
       at System.Windows.Threading.ExceptionWrapper.InternalRealCall(Delegate callback, Object args, Int32 numArgs)
       at System.Windows.Threading.ExceptionWrapper.TryCatchWhen(Object source, Delegate callback, Object args, Int32 numArgs, Delegate catchHandler)
       at System.Windows.Threading.Dispatcher.LegacyInvokeImpl(DispatcherPriority priority, TimeSpan timeout, Delegate method, Object args, Int32 numArgs)
       at MS.Win32.HwndSubclass.SubclassWndProc(IntPtr hwnd, Int32 msg, IntPtr wParam, IntPtr lParam)
       at MS.Win32.UnsafeNativeMethods.DispatchMessage(MSG& msg)
       at System.Windows.Threading.Dispatcher.PushFrameImpl(DispatcherFrame frame)
       at System.Windows.Threading.Dispatcher.PushFrame(DispatcherFrame frame)
       at System.Windows.Application.RunDispatcher(Object ignore)
       at System.Windows.Application.RunInternal(Window window)
       at System.Windows.Application.Run(Window window)
       at SDE.GRFEditorMain.Main(String[] args)

    --------------         Exception         --------------
    Tamir.SharpSsh.jsch.JSchException: Session.connect: System.IO.IOException: End of IO Stream Read
       at Tamir.SharpSsh.jsch.IO.getByte(Byte[] array, Int32 begin, Int32 length)
       at Tamir.SharpSsh.jsch.Session.read(Buffer buf)
       at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
       at Tamir.SharpSsh.jsch.Session.connect(Int32 connectTimeout)
       at Tamir.SharpSsh.SshBase.ConnectSession(Int32 tcpPort)
       at Tamir.SharpSsh.SshBase.Connect(Int32 tcpPort)
       at SDE.Editor.Engines.SftpFileManager.Open()
       at SDE.View.Dialogs.ExplorerDialog..ctor(String path, SdeEditor editor)
       at SDE.View.Dialogs.FtpLogin._buttonExplore_Click(Object sender, RoutedEventArgs e)
     

     

  2. So I'm using Visual Studio, unfortunately there's no defined number of Permissions for PC_PERM_MAX. It looks like it automatically identify all of them.

     

    Quote

    pc.hpp

    uint32 login_id1, login_id2;
        uint64 class_;    //This is the internal job ID used by the map server to simplify comparisons/queries/etc. [Skotlex]
        int group_id;
        std::shared_ptr<s_player_group> group;
        std::bitset<PC_PERM_MAX> permissions; // group permissions have to be copied, because they might be adjusted by atcommand addperm
        int count_rewarp; //count how many time we being rewarped

    and 
     

    Quote

    pc_groups.hpp

     

    enum e_pc_permission : uint32 {
        PC_PERM_TRADE = 0,
        PC_PERM_PARTY,
        PC_PERM_ALL_SKILL,
        PC_PERM_USE_ALL_EQUIPMENT,
        PC_PERM_SKILL_UNCONDITIONAL,
        PC_PERM_JOIN_ALL_CHAT,
        PC_PERM_NO_CHAT_KICK,
        PC_PERM_HIDE_SESSION,
        PC_PERM_WHO_DISPLAY_AID,
        PC_PERM_RECEIVE_HACK_INFO,
        PC_PERM_WARP_ANYWHERE,
        PC_PERM_VIEW_HPMETER,
        PC_PERM_VIEW_EQUIPMENT,
        PC_PERM_USE_CHECK,
        PC_PERM_USE_CHANGEMAPTYPE,
        PC_PERM_USE_ALL_COMMANDS,
        PC_PERM_RECEIVE_REQUESTS,
        PC_PERM_SHOW_BOSS,
        PC_PERM_DISABLE_PVM,
        PC_PERM_DISABLE_PVP,
        PC_PERM_DISABLE_CMD_DEAD,
        PC_PERM_CHANNEL_ADMIN,
        PC_PERM_TRADE_BOUNDED,
        PC_PERM_ITEM_UNCONDITIONAL,
        PC_PERM_ENABLE_COMMAND,
        PC_PERM_BYPASS_STAT_ONCLONE,
        PC_PERM_BYPASS_MAX_STAT,
        PC_PERM_ATTENDANCE,
        //.. add other here
        PC_PERM_MAX,
        PC_PERM_MAILER,
        PC_ANTI_ABUSE,
    };

    static const struct s_pcg_permission_name {
        const char *name;
        enum e_pc_permission permission;
    } pc_g_permission_name[PC_PERM_MAX] = {
        { "can_trade", PC_PERM_TRADE },
        { "can_party", PC_PERM_PARTY },
        { "all_skill", PC_PERM_ALL_SKILL },
        { "all_equipment", PC_PERM_USE_ALL_EQUIPMENT },
        { "skill_unconditional", PC_PERM_SKILL_UNCONDITIONAL },
        { "join_chat", PC_PERM_JOIN_ALL_CHAT },
        { "kick_chat", PC_PERM_NO_CHAT_KICK },
        { "hide_session", PC_PERM_HIDE_SESSION },
        { "who_display_aid", PC_PERM_WHO_DISPLAY_AID },
        { "hack_info", PC_PERM_RECEIVE_HACK_INFO },
        { "any_warp", PC_PERM_WARP_ANYWHERE },
        { "view_hpmeter", PC_PERM_VIEW_HPMETER },
        { "view_equipment", PC_PERM_VIEW_EQUIPMENT },
        { "use_check", PC_PERM_USE_CHECK },
        { "use_changemaptype", PC_PERM_USE_CHANGEMAPTYPE },
        { "all_commands", PC_PERM_USE_ALL_COMMANDS },
        { "receive_requests", PC_PERM_RECEIVE_REQUESTS },
        { "show_bossmobs", PC_PERM_SHOW_BOSS },
        { "disable_pvm", PC_PERM_DISABLE_PVM },
        { "disable_pvp", PC_PERM_DISABLE_PVP },
        { "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD },
        { "channel_admin", PC_PERM_CHANNEL_ADMIN },
        { "can_trade_bounded", PC_PERM_TRADE_BOUNDED },
        { "item_unconditional", PC_PERM_ITEM_UNCONDITIONAL },
        { "command_enable",PC_PERM_ENABLE_COMMAND },
        { "bypass_stat_onclone",PC_PERM_BYPASS_STAT_ONCLONE },
        { "bypass_max_stat",PC_PERM_BYPASS_MAX_STAT },
        { "attendance",PC_PERM_ATTENDANCE },
        { "can_mail",PC_PERM_MAILER },
        { "anti_abuse",PC_ANTI_ABUSE },
    };

    These are the only 2 mentions of PC_PERM_MAX.

  3. 7 hours ago, Playtester said:

    There was an update to system and it now uses groups.yml instead of groups.conf, might be related to your issue.

    If you had customized the original source file you might have a merge error?

    The code you quoted doesn't even include "const s_pcg_permission_name". From the error message I'd say you have the same const in the array appear twice.

    Look for this code:

    static const struct s_pcg_permission_name {
    	const char *name;
    	enum e_pc_permission permission;
    } pc_g_permission_name[PC_PERM_MAX] = {
    	{ "can_trade", PC_PERM_TRADE },
    	{ "can_party", PC_PERM_PARTY },
    	{ "all_skill", PC_PERM_ALL_SKILL },
    	{ "all_equipment", PC_PERM_USE_ALL_EQUIPMENT },
    	{ "skill_unconditional", PC_PERM_SKILL_UNCONDITIONAL },
    	{ "join_chat", PC_PERM_JOIN_ALL_CHAT },
    	{ "kick_chat", PC_PERM_NO_CHAT_KICK },
    	{ "hide_session", PC_PERM_HIDE_SESSION },
    	{ "who_display_aid", PC_PERM_WHO_DISPLAY_AID },
    	{ "hack_info", PC_PERM_RECEIVE_HACK_INFO },
    	{ "any_warp", PC_PERM_WARP_ANYWHERE },
    	{ "view_hpmeter", PC_PERM_VIEW_HPMETER },
    	{ "view_equipment", PC_PERM_VIEW_EQUIPMENT },
    	{ "use_check", PC_PERM_USE_CHECK },
    	{ "use_changemaptype", PC_PERM_USE_CHANGEMAPTYPE },
    	{ "all_commands", PC_PERM_USE_ALL_COMMANDS },
    	{ "receive_requests", PC_PERM_RECEIVE_REQUESTS },
    	{ "show_bossmobs", PC_PERM_SHOW_BOSS },
    	{ "disable_pvm", PC_PERM_DISABLE_PVM },
    	{ "disable_pvp", PC_PERM_DISABLE_PVP },
    	{ "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD },
    	{ "channel_admin", PC_PERM_CHANNEL_ADMIN },
    	{ "can_trade_bounded", PC_PERM_TRADE_BOUNDED },
    	{ "item_unconditional", PC_PERM_ITEM_UNCONDITIONAL },
    	{ "command_enable",PC_PERM_ENABLE_COMMAND },
    	{ "bypass_stat_onclone",PC_PERM_BYPASS_STAT_ONCLONE },
    	{ "bypass_max_stat",PC_PERM_BYPASS_MAX_STAT },
    	{ "attendance",PC_PERM_ATTENDANCE },
    };

     

    This is mine
     

    Quote

    enum e_pc_permission : uint32 {
        PC_PERM_TRADE = 0,
        PC_PERM_PARTY,
        PC_PERM_ALL_SKILL,
        PC_PERM_USE_ALL_EQUIPMENT,
        PC_PERM_SKILL_UNCONDITIONAL,
        PC_PERM_JOIN_ALL_CHAT,
        PC_PERM_NO_CHAT_KICK,
        PC_PERM_HIDE_SESSION,
        PC_PERM_WHO_DISPLAY_AID,
        PC_PERM_RECEIVE_HACK_INFO,
        PC_PERM_WARP_ANYWHERE,
        PC_PERM_VIEW_HPMETER,
        PC_PERM_VIEW_EQUIPMENT,
        PC_PERM_USE_CHECK,
        PC_PERM_USE_CHANGEMAPTYPE,
        PC_PERM_USE_ALL_COMMANDS,
        PC_PERM_RECEIVE_REQUESTS,
        PC_PERM_SHOW_BOSS,
        PC_PERM_DISABLE_PVM,
        PC_PERM_DISABLE_PVP,
        PC_PERM_DISABLE_CMD_DEAD,
        PC_PERM_CHANNEL_ADMIN,
        PC_PERM_TRADE_BOUNDED,
        PC_PERM_ITEM_UNCONDITIONAL,
        PC_PERM_ENABLE_COMMAND,
        PC_PERM_BYPASS_STAT_ONCLONE,
        PC_PERM_BYPASS_MAX_STAT,
        PC_PERM_ATTENDANCE,
        //.. add other here
        PC_PERM_MAX,
        PC_PERM_MAILER,
        PC_ANTI_ABUSE,
    };

    static const struct s_pcg_permission_name {
        const char *name;
        enum e_pc_permission permission;
    } pc_g_permission_name[PC_PERM_MAX] = {
        { "can_trade", PC_PERM_TRADE },
        { "can_party", PC_PERM_PARTY },
        { "all_skill", PC_PERM_ALL_SKILL },
        { "all_equipment", PC_PERM_USE_ALL_EQUIPMENT },
        { "skill_unconditional", PC_PERM_SKILL_UNCONDITIONAL },
        { "join_chat", PC_PERM_JOIN_ALL_CHAT },
        { "kick_chat", PC_PERM_NO_CHAT_KICK },
        { "hide_session", PC_PERM_HIDE_SESSION },
        { "who_display_aid", PC_PERM_WHO_DISPLAY_AID },
        { "hack_info", PC_PERM_RECEIVE_HACK_INFO },
        { "any_warp", PC_PERM_WARP_ANYWHERE },
        { "view_hpmeter", PC_PERM_VIEW_HPMETER },
        { "view_equipment", PC_PERM_VIEW_EQUIPMENT },
        { "use_check", PC_PERM_USE_CHECK },
        { "use_changemaptype", PC_PERM_USE_CHANGEMAPTYPE },
        { "all_commands", PC_PERM_USE_ALL_COMMANDS },
        { "receive_requests", PC_PERM_RECEIVE_REQUESTS },
        { "show_bossmobs", PC_PERM_SHOW_BOSS },
        { "disable_pvm", PC_PERM_DISABLE_PVM },
        { "disable_pvp", PC_PERM_DISABLE_PVP },
        { "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD },
        { "channel_admin", PC_PERM_CHANNEL_ADMIN },
        { "can_trade_bounded", PC_PERM_TRADE_BOUNDED },
        { "item_unconditional", PC_PERM_ITEM_UNCONDITIONAL },
        { "command_enable",PC_PERM_ENABLE_COMMAND },
        { "bypass_stat_onclone",PC_PERM_BYPASS_STAT_ONCLONE },
        { "bypass_max_stat",PC_PERM_BYPASS_MAX_STAT },
        { "attendance",PC_PERM_ATTENDANCE },
        { "can_mail",PC_PERM_MAILER },
        { "anti_abuse",PC_ANTI_ABUSE },
    };

    I have 2 extra due to having custom permissions. Should still work though since none of them are duplicated. Could it be anything else by chance? It almost seems like you can't have extra permissions?

  4. So I just updated my server to the newest git version. I have a few custom group permissions, but I can't seem to fix this error.

    Here's the pc_groups.hpp file info
     

    Quote

    // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
    // For more information, see LICENCE in the main folder

    #ifndef PC_GROUPS_HPP
    #define PC_GROUPS_HPP

    #include <bitset>
    #include <map>
    #include <vector>

    #include "../common/cbasetypes.hpp"
    #include "../common/database.hpp"

    // Forward declaration from atcommands.hpp
    enum AtCommandType : uint8;

    void pc_group_pc_load(struct map_session_data *sd);
    void do_init_pc_groups(void);
    void do_final_pc_groups(void);
    void pc_groups_reload(void);

    enum e_pc_permission : uint32 {
        PC_PERM_TRADE = 0,
        PC_PERM_PARTY,
        PC_PERM_ALL_SKILL,
        PC_PERM_USE_ALL_EQUIPMENT,
        PC_PERM_SKILL_UNCONDITIONAL,
        PC_PERM_JOIN_ALL_CHAT,
        PC_PERM_NO_CHAT_KICK,
        PC_PERM_HIDE_SESSION,
        PC_PERM_WHO_DISPLAY_AID,
        PC_PERM_RECEIVE_HACK_INFO,
        PC_PERM_WARP_ANYWHERE,
        PC_PERM_VIEW_HPMETER,
        PC_PERM_VIEW_EQUIPMENT,
        PC_PERM_USE_CHECK,
        PC_PERM_USE_CHANGEMAPTYPE,
        PC_PERM_USE_ALL_COMMANDS,
        PC_PERM_RECEIVE_REQUESTS,
        PC_PERM_SHOW_BOSS,
        PC_PERM_DISABLE_PVM,
        PC_PERM_DISABLE_PVP,
        PC_PERM_DISABLE_CMD_DEAD,
        PC_PERM_CHANNEL_ADMIN,
        PC_PERM_TRADE_BOUNDED,
        PC_PERM_ITEM_UNCONDITIONAL,
        PC_PERM_ENABLE_COMMAND,
        PC_PERM_BYPASS_STAT_ONCLONE,
        PC_PERM_BYPASS_MAX_STAT,
        PC_PERM_ATTENDANCE,
        //.. add other here
        PC_PERM_MAX,
        PC_PERM_MAILER,
        PC_ANTI_ABUSE,
        PC_PERM_ALLPERMISSION,
    };

    static const struct s_pcg_permission_name {
        const char *name;
        enum e_pc_permission permission;
    } pc_g_permission_name[PC_PERM_MAX] = {
        { "can_trade", PC_PERM_TRADE },
        { "can_party", PC_PERM_PARTY },
        { "all_skill", PC_PERM_ALL_SKILL },
        { "all_equipment", PC_PERM_USE_ALL_EQUIPMENT },
        { "skill_unconditional", PC_PERM_SKILL_UNCONDITIONAL },
        { "join_chat", PC_PERM_JOIN_ALL_CHAT },
        { "kick_chat", PC_PERM_NO_CHAT_KICK },
        { "hide_session", PC_PERM_HIDE_SESSION },
        { "who_display_aid", PC_PERM_WHO_DISPLAY_AID },
        { "hack_info", PC_PERM_RECEIVE_HACK_INFO },
        { "any_warp", PC_PERM_WARP_ANYWHERE },
        { "view_hpmeter", PC_PERM_VIEW_HPMETER },
        { "view_equipment", PC_PERM_VIEW_EQUIPMENT },
        { "use_check", PC_PERM_USE_CHECK },
        { "use_changemaptype", PC_PERM_USE_CHANGEMAPTYPE },
        { "all_commands", PC_PERM_USE_ALL_COMMANDS },
        { "receive_requests", PC_PERM_RECEIVE_REQUESTS },
        { "show_bossmobs", PC_PERM_SHOW_BOSS },
        { "disable_pvm", PC_PERM_DISABLE_PVM },
        { "disable_pvp", PC_PERM_DISABLE_PVP },
        { "disable_commands_when_dead", PC_PERM_DISABLE_CMD_DEAD },
        { "channel_admin", PC_PERM_CHANNEL_ADMIN },
        { "can_trade_bounded", PC_PERM_TRADE_BOUNDED },
        { "item_unconditional", PC_PERM_ITEM_UNCONDITIONAL },
        { "command_enable", PC_PERM_ENABLE_COMMAND },
        { "bypass_stat_onclone", PC_PERM_BYPASS_STAT_ONCLONE },
        { "bypass_max_stat", PC_PERM_BYPASS_MAX_STAT },
        { "attendance", PC_PERM_ATTENDANCE },
        { "can_mail", PC_PERM_MAILER },
        { "anti_abuse", PC_ANTI_ABUSE },
        { "all_permission", PC_PERM_ALLPERMISSION },
    };

    struct s_player_group{
        uint32 id;
        std::string name;
        uint32 level;
        bool log_commands;
        std::vector<std::string> commands;
        std::vector<std::string> char_commands;
        std::bitset<PC_PERM_MAX> permissions;
        uint32 index;

    public:
        bool can_use_command( const std::string& command, AtCommandType type );
        bool has_permission( e_pc_permission permission );
        bool should_log_commands();
    };

    class PlayerGroupDatabase : public TypesafeYamlDatabase<uint32, s_player_group>{
    private:
        std::map<uint32, std::vector<std::string>> inheritance;
        bool parseCommands( const ryml::NodeRef& node, std::vector<std::string>& commands );

    public:
        PlayerGroupDatabase() : TypesafeYamlDatabase( "PLAYER_GROUP_DB", 1 ){

        }

        const std::string getDefaultLocation() override;
        uint64 parseBodyNode( const ryml::NodeRef& node ) override;
        void loadingFinished() override;
    };

    extern PlayerGroupDatabase player_group_db;

    #endif /* PC_GROUPS_HPP */
     

    And the error in terminal...
    Any help appreciated thank you.

    Capture.PNG

  5. When using the patch maker, is there a way to add the password to each grf or the key file so we can make a patch from encrypted grf and make the patch also encrypted using a password/key?

     

    Also is there a way to make a setting to allow "patch maker" put the new grf into a specific folder?

  6. On 1/29/2021 at 5:52 AM, Haruka Mayumi said:

    The problem for this one is you also don't allow vip characters to login since the group id for VIP is 5.. This can be bypass by the gm too if you enable the move character from the char config..

    +		/*One character GM Account [Cookie]
    +		*Character Select GM Account Restriction.
    +		*/
    +		if( slot != 0 && sd->group_id > 2 ){ 
    +		chclif_reject(fd, 0); // rejected from server
    +		}
    +

    For the one below, there are GM accounts below group id 10 which are 2 = Support, 3 = Script Manager(although they can be configure).. Admin account is 99.. Vip account is 5.

    +	//GM Account Restriction 1 Slot only [Cookie]
    +	if( slot != 0 && sd->group_id > 10 ){ // change 10 to minimum gm level
    +		return -2; // character account limit exceeded
    +	}

    Sorry for ressurecting this post. I'm also in need of this patch, if you don't mind could you post the patch please?

  7. Sandbox made a mining script awhile ago, I love the whole aspect of the more you mine the more exp you get and the more you're rewarded over time. The only problem is all scripts are NPCs you click on. I wanted to know if it was possible to have a map I set put monsters on it(mineral) and instead of the NPCs give the mining EXP/drops the monsters do at a given rate, also without the delay in between minerals. I greatly appreciate all and any help. Thank you.

    TLDR: Switch NPC for monsters that spawn, can be killed by player and give EXP/mithril/mithril ore, 1 monster is 1 pickaxe to mine.

     

    //======Name========================================
    // Mining NPC
    //======Version=====================================
    // 1.0
    //======Author(s)===================================
    // Sandbox
    //======Comments====================================
    // In loving memory of AstralRO
    //==================================================
    
    prontera,110,90,3	script	Hermoining	726,{
    
    mes "[^0000FF Hermoining ^000000]";
    mes "Hiya! I'm the master of Mining, ^880000Hermoining^000000!";
    menu "Whoa, teach me master!",-;
    next;
    mes "[^0000FF Hermoining ^000000]";	
    mes "Okay, You'll be needing a ^008800Pick Axe^000000 for mining. While inside the map, you'll be able to mine mithril ores which can be sold for zeny!";
    next;
    mes "[^0000FF Hermoining ^000000]";
    mes "So, do you want to proceed?";
    menu "Yes master!",-,"Buy Pick Axe",Lpick;
    next;
    if(JobLevel < 50) goto Lnjob;
    mes "[^0000FF Hermoining ^000000]";
    mes "Have fun!";
    sc_end SC_ALL;
    warp "force_2-2",174,115;
    close;
    
    Lpick:
    callshop "PickShop";
    close;
    
    Lnjob:
    next;
    mes "[^0000FF Hermoining ^000000]";
    mes "Sorry, you need to be atleast job 50 or higher in order to enter.";
    close;
    
    
    }
    
    
    -	shop	PickShop	-1,6010:10000
    
    force_2-2,159,177,5	script	Mine Exit	848,{
    
    mes "[^888800 Minero ^000000]";
    mes "Do you want to get out of here?";
    menu "Yes please!",-;
    next;
    mes "[^888800 Minero ^000000]";
    mes "See you soon!";
    warp "prontera",118,86;
    close;
    
    
    }
    
    
    force_2-2,161,184,3	script	Mithril Ore	1976,{
    
    
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay; //Comment if you dont want to put a limit on mining
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) { //Comment if you dont want to put a limit on mining DEFAULT = 10,000x failed or success
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2); //50% chance to obtain mithril ore
    set @purechance,rand(1,3); //33.33% chance to obtain an ADDITIONAL mithril, which sells higher
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102; //Mining level 0 waits 4 seconds before mining
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102; //Mining level 1 waits 3 seconds before mining
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) { //Mining level 2 waits 2 seconds before mining
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102; //Mining level 3 waits 1 second before mining
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    //Required experience before a player's mining level increases.
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    
    //==================================================================
    // I did not duplicate the NPCs since I encountered players who tried
    // To abuse this script by using WPE/macros that can get the NPC ID
    // That can bypass the delay between the mining process..
    //==================================================================
    
    force_2-2,161,184,3	script	Mithril Ore#1	1976,{
    
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#2	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#3	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#4	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#5	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#6	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#7	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#8	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#9	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#10	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#11	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#12	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#13	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#14	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#15	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    
    force_2-2,161,184,3	script	Mithril Ore#16	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#17	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#18	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#19	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#20	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#21	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#22	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#23	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    force_2-2,161,184,3	script	Mithril Ore#24	1976,{
    if(#minedelay+86400 > gettimetick(2)) goto Ldelay;
    if(@mining != 0) goto Lstillmine;
    if(.mining != 0) goto Lalreadymine;
    //mes "Do you want to mine this rock?";
    //menu "Proceed",-;
    //next;
    
    if(countitem(6010) < 1) goto Lnopick;
    
    delitem 6010,1;
    
    set #MineCount,#MineCount+1;
    	if(#MineCount == 10000) {
    		set #minedelay,gettimetick(2);
    		set #MineCount,0;
    	}
    
    set @minechance,rand(1,2);
    set @purechance,rand(1,3);
    
    set .mining,1;
    set @mining,1;
    pcblockmove getcharid(3),1;
    
    if(MineLvl == 0) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 1) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    else if(MineLvl == 2) {
    
    	misceffect 102;
    	sleep2 1000;
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    if(MineLvl == 3) {
    
    	misceffect 102;
    	sleep2 1000;
    	set .mining,0;
    	set @mining,0;
    	pcblockmove getcharid(3),0;
    
    
    	if(@minechance == 2) {
    	misceffect 154;
    	set MineExp,MineExp+1;
    	if(@purechance == 3) getitem 7757,1;
    	else getitem 7233,1;
    	goto Lsuccess;
    	}
    else {
    	misceffect 155;
    	goto Lfail;
    	}
    }
    
    Lsuccess:
    dispbottom "You've successfully mined the ore.";
    if(MineExp < 10000) dispbottom "You've gained 1 Mining Exp.";
    if(MineExp == 1000) { set MineLvl,1;
    dispbottom "Congratulations! Your Mining Mastery is now Level 1!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 1!",bc_all,0x00FFFF;
    }
    else if(MineExp == 5000) { set MineLvl,2;
    dispbottom "Congratulations! Your Mining Mastery is now Level 2!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 2!",bc_all,0x00FFFF;
    }
    else if(MineExp == 10000) { set MineLvl,3;
    dispbottom "Congratulations! Your Mining Mastery is now Level 3!";
    announce strcharinfo(0)+"'s Mining Mastery reached Level 3!",bc_all,0x00FFFF;
    }
    end;
    
    Lfail:
    dispbottom "You got nothing from the ore.";
    end;
    
    Lnopick:
    mes "^FF0000*Hand Smash!!*^000000";
    next;
    mes "Ouch! I'll be needing a ^008800Pickaxe^000000 for this..";
    close;
    
    Lalreadymine:
    mes "Hey! Get your own spot!";
    close;
    
    
    Lstillmine:
    mes "Ugh, i'm not done mining yet!";
    close;
    
    
    Ldelay:
    mes "You can only mine 10,000 ores a day!";
    close;
    
    OnInit:
    goto Lwalk;
    end;
    
    
    Lwalk:
    sleep2 1000;
    npcwalkto rand(161,186),rand(119,184);
    goto Lwalk;
    end;
    
    }
    
    //force_2-2,161,184,3	script	Mithril Ore#25	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#26	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#27	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#28	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#30	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#31	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#32	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#33	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#34	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#35	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#36	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#37	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#38	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#39	1976,{}
    //force_2-2,161,184,3	script	Mithril Ore#40	1976,{}

     

  8. So I have this script that I've been working on, but the problem is, it only spawns 1 of the monsters, trying to get random monsters off the list with the % based chance to spawn. If possible I'd like to keep the array mob_ID,%chance, if not it's okay, would much rather a functioning script over functionality.

     

    ba_chess,20,20,6	script	MvP Shower Helper	10023,{
    	
    	if(getgmlevel() >= 90){
    		mes "Hello"+ strcharinfo(0) +", welcome to the MvP Shower NPC.";
    		mes "Please select a map you'd like to spawn MvPs on.";
    		next;
    		
    		.@select$ = implode(.map_name$, ":");
    		.@i = select( .@select$ ) - 1;
    		
    		mes "How many MvPs would you like to spawn on map "+ .map_name$[.@i] +"?";
    		next;
    		
    		input .@mob_nbr;
    		
    		mes "So you have choosen to spawn "+ .@mob_nbr +" on "+ .map_name$[.@i] +" is this correct?";
    		if(select("Yes:No") == 2) end;
    		
    		.@rand = rand(1,getarraysize(.size_mob)/2)*2;
    		monster .map_name$[.@i],0,0,"--ja--",.mob_id[.@rand+1],.@mob_nbr;
    	}
    OnInit:
    setarray .map_name$,"ba_chess","veil","prontera","fair_izlude","ba_bath";
    setarray .mob_id[1],1857,5,1002,10,1031,2,1113,15,1613,33,1836,60;
    .size_mob = getarraysize( .mob_id );
    end;
    }

    I appreciate any help given.

  9. On 6/21/2021 at 11:35 AM, Litro Endemic said:
    // START OF NEW CHECK - [Duplicate IP in one party?]
    	attachrid .@origin;
    
    	// Check Party Members
    	.@p = getcharid(1);
    	if (.@p == 0)
    	{
    		mes "you have no party";
    		close;
    	}
    	getpartymember .@p, 2, .@aid;
    	.@count = $@partymembercount;
    	
    	// make sure there is no pause between the check and collected party member data
    	// like script command next, select, prompt, sleep2, sleep.
    	for (.@i = 0; .@i < .@count; .@i++)
    	{
    		// no need to check with isloggedin anymore,
    		// if failed to attach meaning the party member / player isn't online,
    		// since only one char in account id can online at one time.
    		if (attachrid(.@aid[.@i]) == true)
    		{
    			// getcharip() script command was there in the script engine, why query?
    			.@ip$ = getcharip();
    
    			 // script for you self? if use gepard do not bother using query,
    			 // get_unique_id() should be there in the script engine, why query?
    			.@guid = get_unique_id();
    			
    			// check ip duplicate
    			if ((.@j = inarray(.@iplist$, .@ip$)) > -1)
    				.@iplist_$[getarraysize(.@iplist_$)] = strcharinfo(0);
    			else
    				.@iplist$[getarraysize(.@iplist$)] = .@ip$;
    			
    			// check gepard unique id duplicate
    			if ((.@j = inarray(.@guidlist, .@guid)) > -1)
    				.@guidlist$[getarraysize(.@guidlist$)] = strcharinfo(0);
    			else
    				.@guidlist[getarraysize[.@guidlist]] = .@guid;
    		}	
    	}
    	
    	// Get back to party leader to display message
    	attachrid .@origin;
    	
    	if (getarraysize(.@iplist_$))
    	{
    		mes "There is party member that found with same ip they are "+ implode(.@iplist$, ",");
    		close;
    	}
    	if (getarraysize(.@guidlist$))
    	{
    		mes "There is party member that found with same pc they are "+ implode(.@guidlist$, ",");
    		close;
    	}
    // END OF NEW CHECK

     

    Thank you for helping! The reason for the SQL is because it gets emptied every day so they can go back in the next. As far as I know there's not a way to remove a gepard unique_id variable without talking to an NPC, so I found it to be easier to use a SQL to keep track and delete it daily(I have an OnClock for this towards the end of the script.). But you're clearly much better at this then I am and that's why I came here for help because I'm unsure where to go from here.

     

    Basically if the party member IP isn't the same(stopping dual client or same IP party members from entering) and making sure the party members haven't entered in the event before. Here's the actual script for better reference.

    //===== rAthena Script =======================================
    //= MVP Ladder Game
    //===== By: ==================================================
    //= aftermath, AnnieRuru (rewrite)
    //===== Current Version: =====================================
    //= 1.0
    //===== Compatible With: =====================================
    //= rAthena Project
    //===== Description: =========================================
    //= Gather a party and kill every MVP in ascending order.
    //===== Additional Comments: =================================
    //= 1.0 First version, edited. [Euphy]
    //============================================================
    
    veil,81,134,6	script	Quistis Trepe	10414,{
    	.gui = get_unique_id ();
    	.@nb = query_sql("SELECT `dailybbq` FROM `bloody_branch_uid` WHERE `unique_id` = "+.gui+" LIMIT 1", .@bbq);
    	
    	mes "[Quistis Trepe]";
    	mes "Say... do you want to play the MvP Ladder game? It cost 15 Vote Coins Per person, total of 30 Vote Coins now to get in.";
    	next;
    	switch(select("Yes, let's get it on!:Information.:Show me the best record.:No.")) {
    		case 1:
    			if (.@bbq == 0) {
    				break;
    			} else if (.@bbq >= 1) {
    				mes "You have already completed the Bloody Branch Quest for today. Come back tomorrow after 12:00am server time.";
    				close;
    			}
    			
    		
    		case 2:
    			mes "[Quistis Trepe]";
    			mes "In this game, your party has to kill every single MvP monster in ascending order, from the weakest to strongest.";
    			if ( .finish_item_amount )
    				mes "If your party can finish the MVP ladder game, each member will earn "+ callfunc("F_InsertPlural", .finish_item_amount, getitemname( .finish_item_id )) +".";
    			if ( .register_cost )
    				mes "But the entrance fee is 15 vote coins per person, which means 30 Vote Coin total.";
    				mes "Everyone need to vote on the websites to get 300 Vote Point, you can exchange them for 30 Vote Coins with the VoteForPoints Npc";
    			next;
    			mes "[Quistis Trepe]";
    			mes "You lose the game if you can't finish in "+ .timeout +" minutes, or if your entire party is killed.";
    			mes "Good luck!";
    			close;
    		
    		case 3:
    			mes "[Quistis Trepe]";
    			if ( !$mvpladdderparty_time ) {
    				mes "Nobody has finished this game yet.";
    				close;
    			}
    			mes "The best record is";
    			mes "[ "+( $mvpladdderparty_time / 60 )+" min "+( $mvpladdderparty_time % 60 )+" sec ]";
    			mes "By the party ^FF0000"+ $mvpladdderparty_name$ +"^000000.";
    			.@size = getarraysize( $mvpladderparty_member$ );
    			for ( .@i = 0; .@i < .@size; .@i++ )
    				mes "^000000"+ ( .@i +1 ) +". ^0000FF"+ $mvpladderparty_member$[.@i];
    			if ( getgmlevel() < .gmlvlreset ) close;
    			next;
    			if ( select( "Close.", "Reset the record." ) == 1 ) close;
    			if ( select( "Never mind.", "I really want to reset it." ) == 1 ) close;
    			$mvpladdderparty_time = 0;
    			$mvpladdderparty_name$ = "";
    			deletearray $mvpladderparty_member$[.@i];
    			mes "[Quistis Trepe]";
    			mes "Record reset successfully.";
    			close;
    			
    		case 4:
    			mes "[Quistis Trepe]";
    			mes "When you are strong enough to complete the game, please come back.";
    			close;
    		}
    		
    	if ( !getcharid(1) ) {
    		mes "[Quistis Trepe]";
    		mes "You have to form a party to play.";
    		close;
    	}
    	
    	if ( is_party_leader() == false ) {
    		mes "[Quistis Trepe]";
    		mes "Only the party leader can register.";
    		close;
    	}
    	
    	.@origin = getcharid(3);
    	getpartymember getcharid(1),1;
    	getpartymember getcharid(1),2;
    	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    		if (isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) == 0)
    		continue;{
    			.@class = readparam( Class, $@partymembercid[.@i] );
    			if (compare( .@job_list$, "|" + .@class + "|" ) == 1) {
    				mes "Sorry, only one " + jobname(.@class) + " is allowed.";
    				close;
    			}
    		.@job_list$ += "|" + .@class + "|";
    		.@online++;
    		}	
    	}
    	
    // START OF NEW CHECK - [Duplicate IP in one party?]
    	attachrid .@origin;
    	// for IP check
    	set .@party_list$, "";
    	set .@done_list$, "";
    	set .@dupli, 0;
    	set .@done, 0;
    	
    	// Check Party Members
    	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    		if (isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) == 0)
    		continue;{
    			attachrid $@partymemberaid[.@i];
    			.@lip = query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + $@partymemberaid[.@i] + "", .@ipd$);
    			.@pmu = query_sql("SELECT last_unique_id FROM `login` WHERE account_id ="+$@partymemberaid[.@i]+"", .@party_mem_uid$);
    			.@gpmu = query_sql("SELECT `dailybbq` FROM `bloody_branch_uid` WHERE `unique_id` = "+.@party_mem_uid$+" LIMIT 1", .@pmbbq$);
    			.@cip = compare(.@party_list$, "|" + .@ipd$ + "|" )
    			.@cuid = compare(.@party_list$, "|" + .@pmbbq$ + "|" )
    			
    			//Check party member UniqueID and see if they have completed for the day.
    			if(.@cip == 0 && .@cuid == 1) {
    			set .@done, 1;
    			}
    			// If same IP is on party
    			else if(.@cip == 1 && .@cuid == 0) {
    			set .@dupli, 1;
    			}			
    			else if(.@cip == 0 && .@cuid == 0) {
    				// Add IP to party list for checking
    				.@party_list$ += "|" + .@ipd$ + "|";
    				// Add Unique_ID to party list for checking
    				.@party_list$ += "|" + .@pmbbq$ + "|";
    			}
    			
    			// If acc has entered ladder
    			if (compare( .en_acc_list$, "|" + getcharid(3,strcharinfo(0)) + "|" ) == 1) {
    				if(.@done_list$ == "")
    					.@done_list$ += strcharinfo(0);
    				else
    					.@done_list$ += ", " + strcharinfo(0);
    			}
    		}	
    	}
    	
    	// Get back to PTL to display message
    	attachrid .@origin;
    	
    	if(.@done) {
    		mes "A party member has completed the Bloody branch Quest today.";
    		close;
    	}
    	
    	if(.@dupli) {
    		mes "Sorry, party members with the same IP address can't enter.";
    		close;
    	}
    	
    	if(.@done_list$ != "") {
    		mes "Sorry, the following people has already entered the ladder today:";
    		mes .@done_list$;
    		close;
    	}
    // END OF NEW CHECK
    
    	else if ( $@partymembercount != .register_min ) {
    		mes "[Quistis Trepe]";
    		mes "You have to form a party with exactly "+ .register_min +" different classes members to play.";
    		close;
    	}
    	
    	else if ( .@online != .register_min )  {
    		mes "[Quistis Trepe]";
    		mes "Your party must have "+ .register_min +" members online on map '"+ strnpcinfo(4) +"'.";
    		close;
    	}
    	
    	else if (countitem(34207) < 15) {
    		mes "[Quistis Trepe]";
    		mes "Someone in the party doesn't have 15 vote coins.";
    		close;
    	}
    	
    // PTL has 5 miths, check for other pt members
    	else if (countitem(34207) > 14) {
    		for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    			attachrid $@partymemberaid[.@i];
    			if (countitem(34207) < 15) {
    				attachrid .@origin;
    				mes "[Quistis Trepe]";
    				mes "You don't have 15 Vote Points. Please come back when you do.";
    				close;
    			}
    		}
    		attachrid .@origin;
    	}
    	
    	if ( .party_id ) {
    		mes "[Quistis Trepe]";
    		mes "I'm sorry, but a party is currently playing the game. Please standby until the party is finished.";
    		mes "Thank you.";
    		close;
    	}
    	
    	announce "The party ["+ strcharinfo(1) +"] has started the MvP ladder game.", bc_all;
    	// Delete mithril coins for each PT member
    	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    		attachrid $@partymemberaid[.@i];
    		delitem 34207,15;
    	}
    	
    	attachrid .@origin;
    	set .party_id, getcharid(1);
    	set .@time_enter, gettimetick(2);
    	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    		if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
    			attachrid $@partymemberaid[.@i];
    			if ( strcharinfo(3) == strnpcinfo(4) ) {
    				announce "You have "+ .timeout +" minutes to complete "+ .totalround +" rounds.", bc_self;
    				.@name$[.@c] = strcharinfo(0);
    				.@c++;
    			}
    		}
    	}
    	
    	cleanmap .eventmap$;
    	warpparty .eventmap$, 0,0, .party_id, strnpcinfo(4);
    	attachrid .@origin;
    	mes "hello";
    	donpcevent strnpcinfo(0)+"::OnMvpDead";
    	sleep .timeout * 60000;
    	if ( .round == .totalround +1 ) {
    		getpartymember .party_id, 1;
    		getpartymember .party_id, 2;
    		mapannounce .eventmap$, "Congratulations... You were able to defeat all the MVPs!", bc_map;
    		for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    			if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
    				attachrid $@partymemberaid[.@i];
    				if
    				query_sql("SELECT last_unique_id FROM `login` WHERE account_id ="+$@partymemberaid[.@i]+"", .@party_mem_uid_done$);
    				query_sql( "INSERT INTO `bloody_branch_uid` VALUES ("+.@party_mem_uid_done$+", 1)");
    				query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + $@partymemberaid[.@i] + "", .@ipd$);
    				if ( strcharinfo(3) == .eventmap$ )
    					getitem .finish_item_id, .finish_item_amount;
    				.entered_list$ += "|" + .@ipd$ + "|";
    				.en_acc_list$ += "|" + getcharid(3,strcharinfo(0)) + "|";
    			}
    		}
    		
    		set .@rid , getcharid(3,strcharinfo(0));
    		addrid (2,0,getcharid(1)); //attach the rid of all players in the group
    		set questdelay,gettimetick(2)+86400; //set the delay for all players in group
    		detachrid;
    		attachrid(.@rid); //so that the rest of the script will only run on the party leader		
    		set .@timeused, gettimetick(2) - .@time_enter;
    		if ( .bonus_item_amount && .@timeused < .bonus_time * 60 ) {
    			mapannounce .eventmap$, "You are rewarded a bonus item for completing the ladder within "+ .bonus_time +" minutes.", bc_map;
    			for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    				if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
    					attachrid $@partymemberaid[.@i];
    					if ( strcharinfo(3) == .eventmap$ )
    						getitem .bonus_item_id, .bonus_item_amount;
    				}
    			}
    		}
    
    		if ( !$mvpladdderparty_time || .@timeused < $mvpladdderparty_time ) {
    			mapannounce .eventmap$, "And you broke the record! [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map;
    			set $mvpladdderparty_time, .@timeused;
    			set $mvpladdderparty_name$, getpartyname( .party_id );
    			copyarray $mvpladderparty_member$, .@name$, .register_min;
    		}
    		else
    			mapannounce .eventmap$, "Time used [ "+( .@timeused / 60 )+" min "+( .@timeused % 60 )+" sec ]", bc_map;
    		sleep 10000;
    		announce "Player ["+ .@name$ +"] of the party ["+ getpartyname( .party_id ) +"] has finished the Bloody Branch Quest!", bc_all;
    	}
    	else
    		announce "Player ["+ .@name$ +"] of the party ["+ getpartyname( .party_id ) +"] has failed to finish the MvP ladder game.", bc_all;
    //	mapwarp .eventmap$,.Map$,.x,.y,0;
    	killmonsterall .eventmap$;
    	.party_id = .round = 0;
    	end;
    
    OnMvpDead:
    	getpartymember .party_id, 1;
    	getpartymember .party_id, 2;
    	.round++;
    	if ( .round >= 2 && .round != .totalround +1 && .round_item_amount ) {
    		for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    			if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
    				attachrid $@partymemberaid[.@i];
    				if ( strcharinfo(3) == .eventmap$ )
    					getitem .round_item_id, .round_item_amount;
    			}
    		}
    	}
    	if ( .round == .totalround +1 ) {
    		awake strnpcinfo(0);
    		end;
    	}
    	else if ( .round == .totalround )
    		mapannounce .eventmap$, "The final Round will begin in "+ .delay +" seconds...", bc_map;
    	else
    		mapannounce .eventmap$, "Starting round "+ .round +" in "+ .delay +" seconds...", bc_map;
    	sleep .delay * 1000;
    	if ( .mvpid[.round] == 1646 )  // pick random Bio3 MVP
    		.mvpid[.round] = rand(1646,1651);
    	monster .eventmap$,0,0, "--ja--", .mvpid[.round], 1, strnpcinfo(0)+"::OnMvpDead";
    	mapannounce .eventmap$, getmonsterinfo( .mvpid[.round], MOB_NAME ) +" has spawned!", bc_map|bc_blue;
    	end;
    
    OnPCLogoutEvent:
    	if ( hp > 0 )
    		.@less_one = 1;
    	else
    		end;
    		
    OnPCDieEvent:
    	if ( strcharinfo(3) != .eventmap$ || !getcharid(1) ) end;
    	if ( getcharid(1) != .party_id ) end;
    	getpartymember .party_id, 1;
    	getpartymember .party_id, 2;
    	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    		if ( isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) ) {
    			attachrid $@partymemberaid[.@i];
    			if ( strcharinfo(3) == .eventmap$ && hp > 0 )
    				.@alive++;
    		}
    	}
    	if ( .@less_one )
    		.@alive--;
    	if ( !.@alive ) {
    		mapannounce .eventmap$, "Party wiped!", bc_map;
    		sleep 10000;
    		awake strnpcinfo(0);
    	}
    	end;
    
    OnClock0000:
    	set .entered_list$, "";
    	set .en_acc_list$, "";
    	query_sql( "DELETE FROM `bloody_branch_uid` WHERE `dailybbq` = '1'" );
    //	query_sql "truncate table bloody_branch_uid";
    	end;
    
    OnInit:
    	set .entered_list$, "";
    	set .en_acc_list$, "";
    //	Configurations -----------------------------------------------------
    
    	// Time limit (in minutes)
    	// When time runs out, all players inside the room will be kicked out.
    	// Do NOT set this to zero!
    	set .timeout, 30;
    
    	// entrance fee (in Zeny)
    	set .register_cost, 200000000;
    
    	// exact amount of party members needed to start the game
    	set .register_min, 2;
    
    	// id of each mvp. you can add more
    	setarray .mvpid[1],
    		1086,//	Golden Thief Bug	64
    //		1651,// H.Wizz				99
    		1115,//	Eddga				65
    		1150,//	Moonlight Flower	67
    		1159,//	Phreeoni			69
    		1112,//	Drake				70
    		1583,//	Tao Gunka			70
    		1492,//	Incantation Samurai	71
    		1046,//	Doppelgangger		72
    //		1649,// H.Priest			99
    		1252,//	Garm				73
    		1418,//	Evil Snake Lord		73
    		1059,//	Mistress			74
    		1190,//	Orc Lord			74
    //		1646,// Lord Knight			99
    		1087,//	Orc Hero			77
    		1251,//	Knight of Windstorm	77
    		1038,//	Osiris				78
    //		1658,//	Ygnizem				79
    //		1647,// Assassin X			99
    		1272,//	Dark Lord			80
    		1871,//	Fallen Bishop		80
    		1039,//	Baphomet			81
    		1147,//	Maya				81
    //		1650,// Sniper Cecil		99
    		1785,//	Atroce				82
    		1389,//	Dracula				85
    		1630,//	Bacsojin			85
    //		1885,//	Gorynych			85
    		1623,//	RSX 0806			86
    //		1511,//	Amon Ra				88
    //		1648,// Whitesmith			99
    		1688,//	Lady Tanee			89
    		1768,//	Gloom Under Night	89
    		1719,//	Datale				90
    //		1734,//	Kiel D-01			90
    		1157,//	Pharaoh				93
    		1373,//	Lord of Death		94
    //		1312,//	Turtle General		97
    		1779,//	Ktullanux			98
    		1874,//	Beelzebub			98
    //		1646,// Bio3 placeholder    99
    		1708,//	Thanatos			99
    		1751,//	Valkyrie Randgris	99
    		1832;//	Ifrit				99
    
    
    	// number of rounds (default: 39)
    	//set .totalround, getarraysize(.mvpid) -1;
    	set .totalround, 2; //if you want 35 rounds
    
    	// item reward for completing each round
    //	set .round_item_id, 607;
    //	set .round_item_amount, 1;
    
    	// item reward for completing the entire ladder
    	set .finish_item_id, 12103;
    	set .finish_item_amount, 20;
    
    	// bonus reward if ladder completed within a certain time (in minutes)
    	set .bonus_time, 15; // if completed within 15 minutes, this reward is given
    	set .bonus_item_id, 12103;
    	set .bonus_item_amount, 5;
    
    	// time delay between rounds, in seconds (default: 3)
    	set .delay, 3;
    
    	// minimum GM level to reset the best record
    	set .gmlvlreset, 99;
    	
    	// teleport map that the player warps to after they finish the quest
    //	set .Map$,"veil";
    //	set .x,120;
    //	set .y,105;
    	
    
    	// event map
    	set .eventmap$, "cguild_vs22";
    
    	// mapflag configuration
    	setarray .@mapflag,
    		mf_nowarp,
    		mf_nowarpto,
    		mf_nosave,
    		mf_nomemo,
    		mf_noteleport,
    //		mf_nopenalty, // disable exp loss
    		mf_noreturn,
    //		mf_nobranch,
    //		mf_nomobloot, // disable monster drop loots,
    //		mf_nomvploot, // 2 of these
    //		mf_nodrop,
    		mf_partylock;
    
    //	Config Ends --------------------------------------------------------------
    
    	mapannounce .eventmap$, "An administrator has refreshed the server. Please re-register. We apologize for the inconvenience.", bc_map;
    //	getmapxy .map$, .x, .y, BL_NPC;
    //	mapwarp .eventmap$, .Map$, .x, .y;
    	killmonsterall .eventmap$;
    	.@size = getarraysize( .@mapflag );
    	for ( .@i = 0; .@i < .@size; .@i++ )
    		setmapflag .eventmap$, .@mapflag[.@i];
    
    //waitingroom"Bloody Branch Quest",0;
    
    end;
    }
    
    veil_guide,81,134,6	duplicate(Quistis Trepe)	Quistis Trepe#Guides	10414
    
    
    -	script	sqlresetter	-1,{
    OnCommand: //Add event on the start of your npc
    	dispbottom "BBQ sql has been reset for testing purpose.";
    	query_sql( "DELETE FROM `bloody_branch_uid` WHERE `dailybbq` = '1'" );
    end;
    
    OnInit:
    	bindatcmd "sql",strnpcinfo(3) + "::OnCommand";
    end;
    }
    
    
    -	script	no_reins2	-1,{
    OnPCLoadMapEvent:
    if (strcharinfo(3) == "cguild_vs22" && ismounting() ) { setmounting(); }
    }
    cguild_vs22	mapflag	loadevent

     

     

    On 6/25/2021 at 1:10 AM, Magnetix said:

    Please refer to my reply and ignore my suggestion at the bottom. I already mentioned that the script already offers a uid check, you just have to reuse it.

     

    veil,81,134,6	script	Quistis Trepe	10414,{
    	.gui = get_unique_id ();
    	.@nb = query_sql("SELECT `dailybbq` FROM `bloody_branch_uid` WHERE `unique_id` = "+.gui+" LIMIT 1", .@bbq);
    	
    	mes "[Quistis Trepe]";
    	mes "Say... do you want to play the MvP Ladder game? It cost 15 Vote Coins Per person, total of 30 Vote Coins now to get in.";
    	next;
    	switch(select("Yes, let's get it on!:Information.:Show me the best record.:No.")) {
    		case 1:
    			if (.@bbq == 0) {
    				break;
    			} else if (.@bbq >= 1) {
    				mes "You have already completed the Bloody Branch Quest for today. Come back tomorrow after 12:00am server time.";
    				close;
    			}

     

    Here's the line of codes that verify party members' IP

    			//Check party member UniqueID and see if they have completed for the day.
    			if(.@cip == 0 && .@cuid == 1) {
    			set .@done, 1;
    			}
    			// If same IP is on party
    			else if(.@cip == 1 && .@cuid == 0) {
    			set .@dupli, 1;
    			}			
    			else if(.@cip == 0 && .@cuid == 0) {
    				// Add IP to party list for checking
    				.@party_list$ += "|" + .@ipd$ + "|";
    				// Add Unique_ID to party list for checking
    				.@party_list$ += "|" + .@pmbbq$ + "|";
    			}

    After this, all you have to do was to reuse/insert the uid check.

    ...and you already did the first few lines

    			.@pmu = query_sql("SELECT last_unique_id FROM `login` WHERE account_id ="+$@partymemberaid[.@i]+"", .@party_mem_uid$);
    			.@gpmu = query_sql("SELECT `dailybbq` FROM `bloody_branch_uid` WHERE `unique_id` = "+.@party_mem_uid$+" LIMIT 1", .@pmbbq$);

     

    Sorry for the late reply. What about the part where the event is complete, is that proper to input both the leader and member? 

  10. So the original code is 

    // START OF NEW CHECK - [Duplicate IP in one party?]
    	attachrid .@origin;
    	// for IP check
    	set .@party_list$, "";
    	set .@done_list$, "";
    	set .@dupli, 0;
    	
    	// Check Party Members
    	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    		if (isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) == 0)
    		continue;{
    			attachrid $@partymemberaid[.@i];
    			query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + $@partymemberaid[.@i] + "", .@ipd$);
    			// If same IP is on party
    			if(compare(.@party_list$, "|" + .@ipd$ + "|" ) == 1) {
    				set .@dupli, 1;
    			} else 
    				// Add IP to party list for checking
    				.@party_list$ += "|" + .@ipd$ + "|";
    			
    			// If acc has entered ladder
    			if (compare( .en_acc_list$, "|" + getcharid(3,strcharinfo(0)) + "|" ) == 1) {
    				if(.@done_list$ == "")
    					.@done_list$ += strcharinfo(0);
    				else
    					.@done_list$ += ", " + strcharinfo(0);
    			}
    		}	
    	}
    	
    	// Get back to PTL to display message
    	attachrid .@origin;
    	
    	if(.@dupli) {
    		mes "Sorry, party members with the same IP address can't enter.";
    		close;
    	}
    	
    	if(.@done_list$ != "") {
    		mes "Sorry, the following people has already entered the ladder today:";
    		mes .@done_list$;
    		close;
    	}
    	
    // END OF NEW CHECK

    This checks the party member is the same IP as party leader.

    But I'm also trying to check to see if the party member has done the event before using uniqueID, here's my attempt.

    // START OF NEW CHECK - [Duplicate IP in one party?]
    	attachrid .@origin;
    	// for IP check
    	set .@party_list$, "";
    	set .@done_list$, "";
    	set .@dupli, 0;
    	set .@done, 0;
    	
    	// Check Party Members
    	for ( .@i = 0; .@i < $@partymembercount; .@i++ ) {
    		if (isloggedin( $@partymemberaid[.@i], $@partymembercid[.@i] ) == 0)
    		continue;{
    			attachrid $@partymemberaid[.@i];
    			.@lip = query_sql ("SELECT `last_ip` FROM `login` WHERE `account_id`=" + $@partymemberaid[.@i] + "", .@ipd$);
    			.@pmu = query_sql("SELECT last_unique_id FROM `login` WHERE account_id ="+$@partymemberaid[.@i]+"", .@party_mem_uid$);
    			.@gpmu = query_sql("SELECT `dailybbq` FROM `bloody_branch_uid` WHERE `unique_id` = "+.@party_mem_uid$+" LIMIT 1", .@pmbbq$);
    			.@cip = compare(.@party_list$, "|" + .@ipd$ + "|" )
    			.@cuid = compare(.@party_list$, "|" + .@pmbbq$ + "|" )
    			
    			//Check party member UniqueID and see if they have completed for the day.
    			if(.@cip == 0 && .@cuid == 1) {
    			set .@done, 1;
    			}
    			// If same IP is on party
    			else if(.@cip == 1 && .@cuid == 0) {
    			set .@dupli, 1;
    			}			
    			else if(.@cip == 0 && .@cuid == 0) {
    				// Add IP to party list for checking
    				.@party_list$ += "|" + .@ipd$ + "|";
    				// Add Unique_ID to party list for checking
    				.@party_list$ += "|" + .@pmbbq$ + "|";
    			}
    			
    			// If acc has entered ladder
    			if (compare( .en_acc_list$, "|" + getcharid(3,strcharinfo(0)) + "|" ) == 1) {
    				if(.@done_list$ == "")
    					.@done_list$ += strcharinfo(0);
    				else
    					.@done_list$ += ", " + strcharinfo(0);
    			}
    		}	
    	}
    	
    	// Get back to PTL to display message
    	attachrid .@origin;
    	
    	if(.@done) {
    		mes "A party member has completed the Bloody branch Quest today.";
    		close;
    	}
    	
    	if(.@dupli) {
    		mes "Sorry, party members with the same IP address can't enter.";
    		close;
    	}
    	
    	if(.@done_list$ != "") {
    		mes "Sorry, the following people has already entered the ladder today:";
    		mes .@done_list$;
    		close;
    	}
    // END OF NEW CHECK

    Could someone help me in this please?

  11. 4 hours ago, Skorm said:

    Maybe something like this.

    
    prontera,157,176,5	script	guide	650,1,1,{
    end;
    OnTouch:
    	.@index = atoi(strnpcinfo(2));
    	if(.@index+1 == getarraysize(.npc_pos_x)) {
    		dispbottom "End";
    	}
    	else {
    		switch(.@index) {
    			case 0:
    				npctalk "Hello I'm the first NPC!";
    				break;
    
    			case 1:
    				npctalk "Hello I'm the second NPC!";
    				break;
    
    			default:
    				npctalk "Hello I'm NPC #"+.@index+".";
    				break;
    		}
    		unitwalk getcharid(3),.npc_pos_x[.@index+1],.npc_pos_y[.@index+1];
    	}
    	end;
    
    OnInit:
    	getmapxy(.@map$,.@x,.@y,BL_NPC,strnpcinfo(0));
    	.@index = atoi(strnpcinfo(2));
    	.npc_pos_x[.@index] = .@x;
    	.npc_pos_y[.@index] = .@y;
    }
    
    prontera,157,170,6	duplicate(guide)	guide#1	650,1,1
    prontera,157,162,6	duplicate(guide)	guide#2	650,1,1
    prontera,157,153,6	duplicate(guide)	guide#3	650,1,1
    prontera,152,150,6	duplicate(guide)	guide#4	650,1,1

     

    Wow thank you for this, it's super close to what I'm looking for, except I'm looking to have 2 different types of NPCs, 1 type that just pushes the player on my guided path, and the other type talks to the player through a message like "hello there "+strcharinfo(3)+".". and then after the message it continues to push the player. To be quite honest, I'm trying to shrink this script from 600+ lines to less than 200. The reason I'm rewriting this is because, A. I already need to make huge adjustments and trying to make for easier editing and B. This file is huge and unoptimized.  The original script worked perfectly, just super hard to make changes.

     

    1 thing that needs to stay is the chatbox staying open between NPCs since I don't think there's a way to stop players from moving off the path without there being a message box on the screen(I've blocked @commands on this map so they can't get out of this). Since NPC Block means no walking but I need movement and rather not teleport players.

     

    Also not sure if it's possible, I have it set the player speed with @speed 50, and then reset to base, is there a way to instead set a temp speed that gets removed after this is complete that doesn't interfere with the players cards/equipment speed buffs unles they log out?

     

  12. Okay let me try and re-explain this... with this script how do I make this happen? I've been trying to edit it so please excuse my comments.

    prontera,157,176,5	script	guide	650,1,1,{
    setarray .@mapx,156,156,156,153;
    setarray .@mapy,170,161,153,150;
    setarray .@guidetype,0,0,1,0;
    .1a = ++
    OnTouch:
    	if(.guide == 0) {
    		unitwalk getcharid(3),.@mapx[.guide[.1a]],.@mapy[.guide[.1a]];
    		set .guide,.1a;
    	}
    	if(.guide >= 1 && .@guidetype[.guide] == 0) {
    		unitwalk getcharid(3),.@mapx[.guide[.1a]],.@mapy[.guide[.1a]];
    		set .guide, .guide++;
    	}
    //	if(.guide >= 1 && .@end >= 0 && .@guidetype[.guide] == 1) {
    //		.guide++;
    //		mes "Test complete";
    //		close;
    //		unitwalk getcharid(3),.@mapx[.guide],.@mapy[.guide];
    //		end;
    //	}
    //	else if(.@end >= 1) {
    //		set .guide,0;
    //		end;
    //	}
    }
    
    prontera,157,170,6	duplicate(guide)	guide#1	650,1,1
    prontera,157,162,6	duplicate(guide)	guide#2	650,1,1
    prontera,157,153,6	duplicate(guide)	guide#3	650,1,1
    prontera,152,150,6	duplicate(guide)	guide#4	650,1,1

    I want to basically run this script OnTouch and boost the player to the next NPC on .guidetype0, except on the guidetype 1, I want to stray away from that and move onto another block and have it talk to the player but then go back to the original OnTouch basically like this...

    screenrAthena014.thumb.jpg.f5ebe6438a4c3c532fb91e4e39793750.jpg

    Except #3 it speaks to player and then moves back to the script to keep going until there's no more NPCs to move to.

  13. 3 hours ago, Magnetix said:

    You can just re-use the check since you're already attaching the party members

    
    	.gui = get_unique_id();
    	.@nb = query_sql("SELECT `bloodybranch` FROM `bloody_branch` WHERE `unique_id` = "+.gui+" LIMIT 1", .@bbq);
    	if (.@nb) .@dupli = 1;

     

    There's a simpler way, instead of the checking the IPs and unique ID, you can also save their account ids.

    Yeah but how would that be a stronger security vs unique_id and IP? I must not be following what you're saying.

×
×
  • Create New...