Jump to content
  • 0

Item in a specific map


Ninjamon

Question


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

Is it possible to make all monsters in a specific map to drop TCG? Is it a map flag or what?

Link to comment
Share on other sites

9 answers to this question

Recommended Posts


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

This would work singularly as well:

 

 

-    script    mobitemadder    -1,{

    OnNPCKillEvent:
        if(strcharinfo(3) == $mobaddmap$ && killedrid == $mobaddID)
            getitem $mobadditem,$mobaddamt;
            end;
    
    // Configuration
    //OnWhisperGlobal:
    OnInit:
        $mobaddID = 1002;                    // Define mob ID number
        $mobaddmap$ = "prt_fild08";        // Define map name
        $mobadditem = 7227;                // Define item ID
        $mobaddamt = 1;                    // Define amount
        dispbottom "Configuration loaded.";    // Vanity confirmation
        end;
    
}

 

It can be customized easily by using an array instead, if you want. Just make sure to reconfigure the settings.

Edited by Via
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

This would work singularly as well:

 

Not really because this way, the player get the items directly on his inventory

 

btw replace all your permanent variable by npc variable, no need the permanent here

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  72
  • Topics Per Day:  0.02
  • Content Count:  2997
  • Reputation:   1130
  • Joined:  05/27/12
  • Last Seen:  

    OnInit:
        //...
        dispbottom "Configuration loaded.";    // Vanity confirmation

'dispbottom' requires an RID, perhaps you meant 'logmes'?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

Not really because this way, the player get the items directly on his inventory

 

btw replace all your permanent variable by npc variable, no need the permanent here

 

You could make it drop on the floor with makeitem, I believe.

 

-    script    mobitemadder    -1, {

    OnNPCKillEvent:
        if(strcharinfo(3) == .@mobaddmap$ && killedrid == .@mobaddID)
            //getitem .@mobadditem = .@mobaddamt;
            getmapxy(.@M$,.@X,.@Y,0);
            makeitem .@mobadditem,.@mobaddamt,.@M$,.@X,.@Y;
            end;
    
    // Configuration
    //OnWhisperGlobal:
    OnInit:
        .@mobaddID = 1002;                    // Define mob ID number
        .@mobaddmap$ = "prt_fild08";        // Define map name
        .@mobadditem = 7227;                // Define item ID
        .@mobaddamt = 1;                    // Define amount
        //dispbottom "Configuration loaded.";    // Vanity confirmation
        end;
    
}

 

 

'dispbottom' requires an RID, perhaps you meant 'logmes'?

 

I added that vanity display message when using the OnWhisperGlobal label to invoke the configuration (as opposed to using @reloadscript?)

Edited by Via
Link to comment
Share on other sites


  • Group:  Developer
  • Topic Count:  10
  • Topics Per Day:  0.00
  • Content Count:  2407
  • Reputation:   613
  • Joined:  07/05/12
  • Last Seen:  

You could make it drop on the floor with makeitem, I believe.

Yes but you forgot the Brackets

 

.@variables will be delete at the end of the script

Use .variables

 

"."      - A NPC variable.

           They exist in the NPC and disappear when the server restarts or the

           NPC is reloaded. Can be accessed from inside the NPC or by calling

           'getvariableofnpc'. Function objects can also have .variables which

           are accessible from inside the function, however 'getvariableofnpc'

           does NOT work on function objects.

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

Woops. The original code was one line, so I sorta forgot.

 

 

-    script    mobitemadder    -1, {

    OnNPCKillEvent:
        if(strcharinfo(3) == .mobaddmap$ && killedrid == .mobaddID) {
            //getitem .mobadditem = .mobaddamt;
            getmapxy(.@M$,.@X,.@Y,0);
            makeitem .mobadditem,.mobaddamt,.@M$,.@X,.@Y;
        }
        end;
    
    // Configuration
    //OnWhisperGlobal:
    OnInit:
        .mobaddID = 1002;                    // Define mob ID number
        .mobaddmap$ = "prt_fild08";        // Define map name
        .mobadditem = 7227;                // Define item ID
        .mobaddamt = 1;                    // Define amount
        //dispbottom "Configuration loaded.";    // Vanity confirmation
        end;
    
}
Edited by Via
Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  113
  • Topics Per Day:  0.03
  • Content Count:  295
  • Reputation:   2
  • Joined:  03/06/12
  • Last Seen:  

Woops. The original code was one line, so I sorta forgot.

 

 

-    script    mobitemadder    -1, {

    OnNPCKillEvent:
        if(strcharinfo(3) == .mobaddmap$ && killedrid == .mobaddID) {
            //getitem .mobadditem = .mobaddamt;
            getmapxy(.@M$,.@X,.@Y,0);
            makeitem .mobadditem,.mobaddamt,.@M$,.@X,.@Y;
        }
        end;
    
    // Configuration
    //OnWhisperGlobal:
    OnInit:
        .mobaddID = 1002;                    // Define mob ID number
        .mobaddmap$ = "prt_fild08";        // Define map name
        .mobadditem = 7227;                // Define item ID
        .mobaddamt = 1;                    // Define amount
        //dispbottom "Configuration loaded.";    // Vanity confirmation
        end;
    
}

Is this a npc only?

Do i need to patch first the one that Euphy first before i start running that script?

Link to comment
Share on other sites


  • Group:  Members
  • Topic Count:  23
  • Topics Per Day:  0.01
  • Content Count:  127
  • Reputation:   36
  • Joined:  01/21/13
  • Last Seen:  

Do i need to patch first the one that Euphy first before i start running that script?

 

No, this is an alternative to using Euphy's patch.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...