Jump to content

Mumbles

Retired Staff
  • Content Count

    618
  • Joined

  • Last visited

  • Days Won

    15

Posts posted by Mumbles


  1.  

    	if( getbrokenid(1) ) repairall;	getinventorylist;	while( .@i < @inventorylist_count ){		if ( !@inventorylist_identify[.@i] ){		delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;		getitem @inventorylist_id[.@i],1;		}		.@i++;	}

     

    I'm just nitpicking, but why not use a for loop since it's counter-controlled anyway?

     

    	for (.@i = 0; .@i < @inventorylist_count; .@i++) {		if (!@inventorylist_identify[.@i]) {			delitem2 @inventorylist_id[.@i],1,0,0,0,0,0,0,0;			getitem @inventorylist_id[.@i],1;		}	}

     

    Also, it might be nice to add in a visual effect for that repair (and enclose it in curly braces, because one-liners is just bad coding habit):

     

    	if (getbrokenid(1)) {		specialeffect2 EF_REPAIRWEAPON;		repairall;	}

  2. Open your server's SQL instance in Workbench so that a window opens for it, presenting you with a window like this:

     

    9QW8Ezx.png

     

    In the sidebar, you should see a menu option for Users and Privileges; it is underlined in the image above. Click on it, a window like this should appear:

     

    L4XwnrI.png

     

    Select or create your desired username for your server, and then set a password for it. If you haven't already made a schema for your server, make one now. I only intend to use my local server for testing purposes, so for the sake of easy reference and configuration, I've set my schema, username, and password all to ragnarok, as it is the default configuration. From here, click on the Schema Privileges tab and add the user ragnarok to the schema ragnarok. I've given the user ragnarok all privileges except GRANT, as it won't ever need it.

     

    p8R19Nd.png

     

    Anddd that's it, as far as setting up your user(s) properly in Workbench. If I missed something or if you have any other questions, please feel free to ask.


  3. my players keep getting prompted by this to choose their job . how to fix this ?

     

    Thanks

     

    This will only prompt players if they do not have the variable auto_third set; if they've already selected their job once, they won't encounter the message anymore. However, if you're loading this (as it is) into a live server, pre-existing players will also be prompted, even if they already have their class of choice. To prevent this from happening, change this line:

    if(auto_third) {

     

    to this:

    if(auto_third || Class) {

  4. hehe no need to sorry since im the one who's looking for a help :D

     

    all workings

     

    but one more thing sir

    is this normal or its just a little mistake?

     

    the cutin images isnt changing... i think it stucks on the first image and the countdown continues but the image not changing

     

     

    Ah, you found another one of my mistakes lol. Change this:

     

    cutin .@image$[.@i], 2;

     

    to this:

     

    cutin .@image$[.@x], 2;

     

    ...or just see my other post for the updated version.


  5. Here's an example:
     

    prontera,150,150,0	script	Sample	100,{	// Cutin file names (plays in reverse order)	setarray .@image$[0], "kafra_05", "kafra_06", "kafra_07";		// Countdown time (in seconds)	.@time = 3;		// Map name to play cutins on	.map_name$ = "prontera";		// Generate array with account IDs	query_sql "SELECT DISTINCT(`account_id`) FROM `char` WHERE `online` = '1'", .@aid;		// Loop through countdown sequence    for (.@x = .@time; .@x > 0; .@x--) {		// Loop through all online players in map		for (.@i = 0; .@i < getarraysize(.@aid); .@i++) {			if (attachrid(.@aid[.@i])) {				if (strcharinfo(3) == .map_name$) { 					cutin .@image$[.@x], 2;				}			}		}				announce "Count down : " +.@x, 0;		sleep 1000;	}		// Clear cutins	for (.@y = 0; .@y < getarraysize(.@aid); .@y++) {		if (attachrid(.@aid[.@y])) {			if (strcharinfo(3) == .map_name$) {				cutin "", 255;			}		}	}		end;	}

  6. Changing the method to the way you described would work, but it seems you already understand what's going on. Patskie's method simply allows you to change the value of .@x within the for loop from "3" to whatever you wish it to be; that way, it will count down for however long you set it to, without cluttering your code unnecessarily.


  7. Here's my method using the OnMinuteXX label as a trigger. It's a bit less effort and allows for virtually limitless amounts of announcements; when the last announcement has been made, it will repeat from the beginning on the next hour.

    -	script	announce	-1,{	/*-----------------------------------------------------	Script	-----------------------------------------------------*/	OnInit:		// Announcement messages		setarray .news$[0],	"This is the first announcement.",							"This is the second announcement.",							"This is the third announcement.";				// Announcement options in corresponding order		setarray .options[0],	bc_all,								bc_all|bc_blue,								bc_all|bc_yellow;				end;			/*-----------------------------------------------------	Configuration	-----------------------------------------------------*/	OnMinute00:		announce .news$[.i], .options[.i];		.i++;				if (.i == getarraysize(.news$)) {			.i = 0;		}				end;}

  8. Utility: Coin Trader

    As per @karazu's request: http://herc.ws/board/topic/4157-mithrill-to-gold-to-silver-coins-vice-versa-trader/

     

    Description:

    Allows players to purchase coins with zeny, exchange coins for zeny, and convert coins to more valuable or lesser coins. See configuration to customise coin values.

     

    Download:

    https://github.com/datmumbles/Scripts/raw/master/util/cointrader.txt


  9. +1 to this. Thank you it's working. BTW How to check/add more item in .item_id for example atleast 3 or more items..

     

    I tried adding comma but it's not working.

     

    Here's a version that supports multiple items:

    prontera,150,150,0	script	testwarp	WARPNPC,1,1,{	message strcharinfo(0), "You touched me!";	/*-----------------------------------------------------	Configuration	-----------------------------------------------------*/	OnInit:		// Item constant/ID, amount		setarray .item_id[0],	Jellopy, 1,								Clover, 5,								Fluff, 10;				// Warp destination		.warp_map$ = "prontera";		.warp_x = 155;		.warp_y = 179;		end;			/*-----------------------------------------------------	Script	-----------------------------------------------------*/	OnTouch:		// Check items		for (.@i = 0; .@i < getarraysize(.item_id); .@i += 2) {			if (countitem(.item_id[.@i]) < .item_id[.@i + 1]) {				message strcharinfo(0), "You need the following items to access this warp:";				for (.@j = 0; .@j < getarraysize(.item_id); .@j += 2) {					message strcharinfo(0), .item_id[.@j + 1] +" "+ getitemname(.item_id[.@j]);				}				message strcharinfo(0), "Access denied.";				end;			}		}				// Delete items		for (.@i = 0; .@i < getarraysize(.item_id); .@i += 2) {			delitem .item_id[.@i], .item_id[.@i + 1];		}				// Warp player		warp .warp_map$, .warp_x, .warp_y;		end;}

  10. While I'm unsure as to whether or not this is possible with our current scope of script commands and item bonuses, I'd just like to clarify a few points.

    • This card negates teleportation effects induced by skills
    • Teleportation is only negated for the user possessing the card
    • Others on the map are still affected by that map's teleportation flags
    • Script-based warps and GM recalls will still work

    Correct?


  11. I see. Oh, and I think that after the header you should put an 'end;', if the script stays this way every time someone clicks the warp it will execute everything that's under OnInit's scope, that's unnecessary overhead. Thank you for your answer.

     

    I typically wouldn't place OnInit overhead, but due to the behaviour of the WARPNPC sprite, its script won't be run when clicked upon. Add this line above the OnInit label and see for yourself:

     

    message strcharinfo(0), "You touched me!";

     

    However, I do concede that it would be good habit to throw an end up there in any similar situation.


  12. this script wasn't working properly with merchant class Character , but bonus script working  well.

     

    try to  switch same position equipments or equip another different position equipment ,you can find

     

    enlarge weight Limit skill effect  not being calculated,also not calculated on merchant class Character

     

    who is in Spirit  state

     

    I suppose I couldn't have expected that to be a permanent substitute. Moving this to Source Requests.

×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use.