Jump to content

AnnieRuru

Script Developers
  • Content Count

    1677
  • Joined

  • Last visited

  • Days Won

    245

Posts posted by AnnieRuru


  1. 20 hours ago, Kuroyama said:

    Is there any possible way to prevent guilds with no emblems to entering the castle?

    need a custom script command like *checkguildemblem

    https://github.com/AnnieRuru/Release/blob/master/plugins/checkguildemblem.c

     

    -	script	woelimit	HIDDEN_NPC,{
    	end;
    OnPCLoadMapEvent:
    	.@guild_id = getcharid(CHAR_ID_GUILD);
    	if (!.@guild_id || !getmapflag(strcharinfo(PC_MAP), MF_GVG_CASTLE) || !agitcheck())
    		end;
    	if (checkguildemblem(.@guild_id))
    		end;
    	message getcharid(CHAR_ID_ACCOUNT), "You must have an emblem to join WOE";
    	warp "Save", 0,0;
    	end;
    }

     

    btw you should combine this script with this one seems similar stuffs that you want to restrict your players in woe .....

     


     

    wait .... how to REMOVE the emblem ?

    once an emblem has been set, the only way is to CHANGE the emblem only

     

    if the guild master CHANGE the emblem into fully transparent 0xFF00FF color then this script command will still fail

    and made a check with emblem data is just like playing cat and mouse, today I deny a full transparent emblem, tomorrow guild master change it with a single dot, it just never ends

     

    this idea don't seem to work


  2. 1.

    .@unique_id$ = get_unique_id();

    I thought gepard uses integer ??

     

    2.

    	if(getd("$ID_" + .@unique_id$) > 0 || #FreebiesReward > 0){
    		mes "[Freebies NPC]";
    		mes "You have already claimed your Freebies.";
    		close;
    	}
    	mes "[Freebies NPC]";
    	mes "Here's your Freebies. Have a nice day!";
    	setd "$ID_" + .@unique_id$,1;
    	#FreebiesReward = 1;

    erm, I am holding my laughter right now, but isn't this only 1 player in the whole server can claim this reward ??


  3. *peek*

    https://gist.github.com/AnnieRuru/f49d2e09c81c31c9c428e088af558f33

    around 30% completion, need to sleep

    a lot of stuffs not finalize yet, but you can play around first, don't put into live server

     

    @Eternity, you are rathena user right ?

    this one I made been using hercules specific script command,

    *getcalendartime and *pcre_match just not available in rathena, so some features has to scrap,

    it won't look the same if these feature taken out


  4. 1 hour ago, evilpuncker said:

    I wanted to know if its possible to edit the code to something like this:

    plugin ... please no source edit, hercules member please don't edit source code by any means necessary
    https://github.com/AnnieRuru/Release/blob/master/plugins/rare_drop_announce.c

     

     

    2 hours ago, evilpuncker said:

    and about the other luk issue, its really hard to track since @monsterinfo doesn't display drop rates based on current player values, but flat values (I think)

    try write a plugin yourself ?


  5. update plugin -> https://github.com/AnnieRuru/Release/blob/master/plugins/addrefinedrop/addrefinedrop_0.3.c

    along with healer script for testing -> https://github.com/AnnieRuru/Release/blob/master/scripts/Utility/healer/healer_1.2.txt

     

    2 hours ago, evilpuncker said:

    sorry for the necropost, but just a small doubt, does the source already check if item is refineable (flag.no_refine) somewhere else or should we add the check too?

    nope, but we can just struct item_data of the nameid to get the data of that item

    1.4 - https://github.com/AnnieRuru/Release/blob/master/plugins/addrefinedrop/addrefinedrop_0.4.c

    - if the item is non-refine-able, it doesn't drop refined items


  6. 44 minutes ago, evilpuncker said:

    lets say my server max stat is 600, what value should I use so at 600 LUCK, I get +10% drop

    Poring has 70% chance to drop a Jellopy

     

    if having 100 LUK, this will make Jellopy 80% drop rate (70% +10)

    // Makes your LUK value affect drop rates on an absolute basis.
    // Setting to 100 means each LUK adds 0.01% chance to find items
    // (regardless of item's base drop rate).
    drops_by_luk: 100000

    if having 100 LUK, this will make Jellopy 77% drop rate (70% * 1.1)

    // Makes your LUK value affect drop rates on a relative basis.
    // Setting to 100 means each LUK adds 1% chance to find items
    // (So at 100 luk, everything will have double chance of dropping).
    drops_by_luk2: 10

     

    600 LUK ... then the value above should divide by 6

    10/6 = .... don't want to think about it

     

    DIDN'T TEST

     


     

    this isn't a percentage type calculation, but a flag on/off

    db\re\item_db.conf

    
    	BuyingStore: true/false       (boolean, defaults to false)
    	Delay: Delay to use item      (int, defaults to 0)
    	KeepAfterUse: true/false      (boolean, defaults to false)
    	DropAnnounce: true/false      (boolean, defaults to false) <---- HERE
    	ShowDropEffect: true/false    (boolean, defaults to false)
    	DropEffectMode: Effect Type   (int, default to 0)

    .... if this feature isn't renewal only why this isn't include in db\item_db2.conf ?


  7. you mean something like
    the first 500 players who redeem this code will get freebies !!

     

    this reminds me in real life e-wallet
    the first 100,000 customer who use this coupon code will get a discount when do online purchase

    terms and conditions apply blah blah

     

    15 minutes ago, evilpuncker said:

    type 2: GM generate code "abc123" and only the first player that use it will be successful, once he use it the code will expire

    once expire ... how ? can't redeem again even for other player ?

    isn't this feels stupid ... the code only used once ... if the GM advertise the code, everyone sees the code, but the code only use once .... =/


  8. 15 minutes ago, evilpuncker said:

    - 2 types of codes: one that can be used multiple times by different accounts, and one that can be used just once only by one account

    this one ... I don't understand though

    how to detect multiple times by different accounts ?

     

    some server out there has a master account system, can register multiple accounts in-game and bind them under a master account in control panel

    but this feature is completely custom, and I never seen the code before, so I don't know how to make use of that


  9. https://rathena.org/board/topic/115232-script-doesnt-recognize-spaces/?do=findComment&comment=344440

     

    seriously this is getting on my nerve whenever somebody bring this script up

    can't everyone just recognize this script is just bug as hell ?

     

    and promotion code can always bypass by players no matter how hard you try

    block by IP is just plain stupid

    better use getitembound instead of getitem so players will realize the reward item is bound to the account only

     

    and when the script made as getitembound, means this VERY OLD script is invalid to use in today's script method

     

    -------------------------------

     

    ok enough being grumpy,

    1. the SQL table has to be case-sensitive

    2. use varchar

    CREATE TABLE IF NOT EXISTS `reward_logs` (
    	`account_id` int unsigned NOT NULL default '0',
    	`last_ip` varchar(16) NOT NULL,
    	`code` VARCHAR(26) NOT NULL,
    	`redeem_time` DATETIME NOT NULL DEFAULT '0000-00-00 00:00:00',
    	`claim` INT NOT NULL,
    	PRIMARY KEY (`code`)
    ) ENGINE = MYISAM;

    and I'm not fixing this script

     

    better just write a new one with *getitembound


  10. https://annieruru.blogspot.com/2019/01/how-to-compare-value-within-array.html

    use 4th method since you are rathena user

     

    prontera,150,190,5	script	kjsfhkdhf	1_F_MARIA,{
    	if (inarray(.deny_ip$, getcharip()) >= 0) {
    		mes "You've claim reward with this IP";
    		close;
    	}
    	.deny_ip$[getarraysize(.deny_ip$)] = getcharip();
    	getitem 501,1;
    	end;
    }

     

    oh, wait, I thought you want modify reward given from koe script

    now you want it to give everyone upon the event ends

    -	script	sdfsdf	FAKE_NPC,{
    Onaaa:
    	.@guild_id = .@atcmd_parameters$; // <-- change this to your guild ID, whatever it came from
    
    	getguildmember .@guild_id, 1;
    	getguildmember .@guild_id, 2;
    	for (.@i = 0; .@i < $@guildmembercount; ++.@i) {
    		if (isloggedin($@guildmemberaid[.@i], $@guildmembercid[.@i])) {
    			if (inarray(.@deny_ip$, getcharip($@guildmemberaid[.@i])) >= 0) {
    				message rid2name($@guildmemberaid[.@i]), "Multiple IP detected.";
    				continue;
    			}
    			.@deny_ip$[getarraysize(.@deny_ip$)] = getcharip($@guildmemberaid[.@i]);
    			getitem 501, 1, $@guildmemberaid;
    		}
    	}
    	end;
    OnInit:
    	bindatcmd "give", strnpcinfo(3)+"::Onaaa";
    	end;
    }

     


  11. if(dar_dar >= 1) goto L_taposme;
    if(hen_hen >= 1) goto L_taposna;
    if(hen_hen >= 1) goto L_taposbts;
    if(hen_hen < 1)

    Hhhhhmmmmmmmmmm...............................................................

    ok this might be some other language I can't understand, I don't want to comment on that

     

    1. after the Lbts menu selection, it should set a permanent player variable, which I think is dar_dar ?

    2.

    
    if(hen_hen < 1)
    
    	mes "[ ^C6A518Guardian of Prontera^000000 ]";
    	mes "The Guardian of Prontera is looking ";
    	mes "for brave warriors willing to";
    	mes "defend our world against evil and darkness.";

    this part is just definitely wrong, it should enclose in curly bracket

    or for a beginner like you just use goto ...

     

    PS: I honestly have no idea how to help a member at this script level ....


  12. so many rathena members here ... at least please put it on your profile so people like us don't have to do convert it again to rathena blah blah

     

    so many mistakes on your script

    1. the checkweight should check from the variable from the *input, if you put check on goldPoint then if players actually farm high amount they might forever said being overweight

    2. the overall ranking you put it this way

    		for (.@i = 0; .@i < .@nb; ++.@i)
    			mes "[ ^C6A518Gold Room Assistant^000000 ]";
    			mes (.@i +1)+". "+ .@name$[.@i] +" - "+ .@ppk[.@i] +" Kills";

    should be this way

    		mes "[ ^C6A518Gold Room Assistant^000000 ]";
    		for (.@i = 0; .@i < .@nb; ++.@i)
    			mes (.@i +1)+". "+ .@name$[.@i] +" - "+ .@ppk[.@i] +" Kills";

    3. and the "your current rank" can be found on the pinned topic

    4. rathena don't support strcharinfo(PC_MAP), it just strcharinfo(3)

    5. finally its `Points` not `Kills`, this script gives random 1~3 points per kill, and the SQL table log in points not kills

     

    https://gist.github.com/AnnieRuru/88e558b500a6e4afe00b559e7dcacd1b


  13. Just now, gidzdlcrz said:

    The one you recorded is a Break the Seal Quest. The one you posted is a different version. They all come in Seal quests like annie told you. Whats wrong with the one you have? Basically they are just the same thing. And its working upon testing it.

    hmm ... how to say, yeah there is official break the seal quest in our repo, which is built for low rate server

    but some server especially high rate server players who only likes get into action doesn't like go to this npc then talk to that npc blah blah blah

    just like me I don't like low rate I love high rate server as you can tell I love writing event scripts and battleground scripts

     

    anyway here's the script, I also made it configurable

    https://gist.github.com/AnnieRuru/b5177016943db888f8d322f937e97427


  14. {
    	Id: 1001
    	SpriteName: "SCORPION"
    	Name: "Scorpion"
    	Lv: 16
    	Hp: 153
    	Sp: 1
    	Exp: 108
    	JExp: 81
    	AttackRange: 1
    	Attack: [33, 7]
    	Def: 16
    	Mdef: 5
    	Stats: {
    		Str: 12
    		Agi: 15
    		Vit: 10
    		Int: 5
    		Dex: 19
    		Luk: 5
    	}
    	ViewRange: 10
    	ChaseRange: 12
    	Size: "Size_Small"
    	Race: "RC_Insect"
    	Element: ("Ele_Fire", 1)
    	Mode: {
    		CanMove: true
    		CastSensorIdle: true
    		CanAttack: true
    		Detector: true
    		ChangeTargetMelee: true
    		ChangeTargetChase: true
    	}
    	MoveSpeed: 200
    	AttackDelay: 1
    	AttackMotion: 1
    	DamageMotion: 1
    	MvpExp: 0
    	Drops: {
    		Boody_Red: 70
    		Scorpions_Tail: 5500
    		Elunium_Stone: 57
    		Solid_Shell: 210
    		Fine_Grit: 100
    		Yellow_Herb: 200
    		Lusty_Iron: 20
    		Scorpion_Card: 1
    	}
    },
    	SCORPION: {
    		NPC_FIREATTACK: {
    			SkillState: "MSS_BERSERK"
    			SkillLevel: 1
    			Rate: 2000
    			Delay: 5000
    			Cancelable: true
    			SkillTarget: "MST_TARGET"
    			CastCondition: "MSC_ALWAYS"
    		}
    		NPC_POISON: {
    			SkillState: "MSS_BERSERK"
    			SkillLevel: 1
    			Rate: 500
    			CastTime: 800
    			Delay: 5000
    			SkillTarget: "MST_TARGET"
    			CastCondition: "MSC_ALWAYS"
    		}
    		NPC_POISONATTACK: {
    			SkillState: "MSS_BERSERK"
    			SkillLevel: 1
    			Rate: 500
    			CastTime: 300
    			Delay: 5000
    			SkillTarget: "MST_TARGET"
    			CastCondition: "MSC_ALWAYS"
    		}
    		MO_EXTREMITYFIST: {
    			SkillState: "MSS_ANY"
    			SkillLevel: 5
    			Rate: 10000
    			CastTime: 0
    			Delay: 0
    			SkillTarget: "MST_TARGET"
    			CastCondition: "MSC_ALWAYS"
    		}
    	}

    you also need to lower monster's AttackDelay and AttackMotion for the monster to cast skill faster too


  15. add OnTouch and emotion ...

    -	script	Healer	-1,{
    OnTouch:
    	.@Price = 0;	// Zeny required for heal
    	.@Buffs = 1;	// Also buff players? (1: yes / 0: no)
    	.@Delay = 1;	// Heal delay, in seconds
    
    	if (@HD > gettimetick(2))
    		end;
    	if (.@Price) {
    		message strcharinfo(0), "Healing costs " + callfunc("F_InsertComma",.@Price) + " Zeny.";
    		if (Zeny < .@Price)
    			end;
    		if (select("^0055FFHeal^000000:^777777Cancel^000000") == 2)
    			end;
    		Zeny -= .@Price;
    	}
    	specialeffect2 EF_HEAL2;
    	percentheal 100,100;
    	emotion ET_CHUP;
    	if (.@Buffs) {
    		specialeffect2 EF_INCAGILITY;
    		sc_start SC_INCREASEAGI,620000,10;
    		specialeffect2 EF_BLESSING;
    		sc_start SC_BLESSING,620000,10;
    		repairall;
    		identifyall;
    	}
    
    	if (.@Delay)
    		@HD = gettimetick(2) + .@Delay;
    	end;
    }
                               
    prontera,151,188,5	duplicate(Healer)	Healer#prt	909,14,14

    honestly rathena still has a few script commands that hercules lacks, like this *identifyall


  16. update to version 1.4, as this one also has nocharms mapflag, similar issue as noitem mapflag

    https://github.com/AnnieRuru/Release/blob/master/plugins/Charms/charms_1.4.c

    - fix memory leak when do multiple `@loadnpc`

     

    On 8/4/2019 at 1:18 AM, iubantot said:

    Is it possible to add a status icon when a certain charm is present in your inventory?

    well yes, actually you also can do it on any equipment, not just charms

    however I don't want to add unnecessary feature on public release version,

    this could be done if open a new topic on plugin request though

     

    EDIT: Eddga_Card

    {
    	Id: 4123
    	AegisName: "Eddga_Card"
    	Name: "Eddga Card"
    	Type: "IT_CARD"
    	Buy: 20
    	Weight: 10
    	Loc: "EQP_SHOES"
    	Script: <" bonus bMaxHPrate,-25; ">
    	OnEquipScript: <" sc_start4 SC_ENDURE,60000,10,0,0,1; ">
    	OnUnequipScript: <" sc_end SC_ENDURE; ">
    },

    hmm ..............................


  17. tested with

    prontera	mapflag	noitem	4,5
    payon	mapflag	noitem	4,5
    izlude	mapflag	noitem	4001,4002,4003
    
    izlude	mapflag	gvg

    type `@mapexit`

    [Status]: Terminating...
    [Status]: Cleaned up 982 maps.
    [Status]: Close Map DB Connection....
    [Status]: Close Log DB Connection....
    [Status]: Finished.
    [Info]: Memory manager: No memory leaks found.

    no memory leak

    I can't reproduce your problem

     

    let me fix that `@loadnpc` anyway

     

    1.9 - plugin

    - fix memory leak when do multiple `@loadnpc`


  18. 1 hour ago, Kuroyama said:

    Memory leak:

    image.png.f7bc8a1cc6b66631725bfa03e3e13d32.png

    I think I've fixed memory leak issue since version 1.7

    but the line shown in screenshot is indeed version 1.8, latest version

     

    did you reproduce this with `@loadnpc` gm command ?

    I tested if use `@loadnpc` only once, there are no memory leak, but `@loadnpc` multiple times on the same file will indeed causes memory leak

     

    otherwise you have to tell me how to reproduce this memory leak issue

×
×
  • Create New...

Important Information

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