Jump to content
  • 0

Old Card Album


Reborn

Question


  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

Hi everyone, can anyone help me on doing this one?

@Skorm and @Technoken

Once the player opens an Old Card Album the player will get the card and at the same time it will broadcast to all what card does the player gets when he/she opens the Old card Album

announce strcharinfo(0)+" gained "+getitemname( .@item )+" from Old Card Album,bc_all;

Link to comment
Share on other sites

7 answers to this question

Recommended Posts

  • 0

  • Group:  Forum Moderator
  • Topic Count:  93
  • Topics Per Day:  0.02
  • Content Count:  10015
  • Reputation:   2348
  • Joined:  10/28/11
  • Last Seen:  

you can use this to simulate the Old Card Album that give proper item rate.

*groupranditem <group id>{,<sub_group>};

Returns the item_id of a random item picked from the group specified. The
different groups and their group number are specified in 'db/(pre-)re/item_group_db.txt'.

When used in conjunction with other functions, you can get a random item. For
example, for a random pet lure:

getitem groupranditem(IG_Taming),1;

'sub_group' is used to get the available random items of item group from specified random
group. 0 for 'must' item group, and random item group is 1 until 5 (MAX_ITEMGROUP_RANDGROUP+1).

More info, see doc/item_group.txt.

the function F_Rand() will give you incorrect item rate.

Link to comment
Share on other sites

  • 2

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

1 hour ago, neXus said:

Hi everyone, can anyone help me on doing this one?

@Skorm and @Technoken

Once the player opens an Old Card Album the player will get the card and at the same time it will broadcast to all what card does the player gets when he/she opens the Old card Album

announce strcharinfo(0)+" gained "+getitemname( .@item )+" from Old Card Album,bc_all;

function	script	OCAannounce	{
	
.@itemID = callfunc("F_Rand",4001,4002,4003,4004,4005,4006,4008,4009,4010,4011,4012,4013,4014,4015,4016,4017,4019,4021,4022,4023,4024,4025,
							4027,4028,4029,4030,4032,4033,4035,4036,4037,4038,4039,4040,4041,4042,4043,4044,4045,4046,4048,4049,4051,4052,
							4053,4055,4056,4057,4058,4060,4061,4062,4063,4064,4065,4066,4067,4068,4069,4070,4071,4072,4073,4074,4075,4076,
							4077,4078,4079,4080,4081,4082,4083,4084,4085,4086,4087,4088,4089,4090,4091,4093,4094,4095,4096,4097,4098,4099,
							4100,4101,4102,4103,4104,4105,4106,4107,4108,4109,4110,4111,4112,4113,4114,4115,4116,4117,4119,4122,4125,4127,
							4133,4136,4139,4141,4149,4150,4151,4152,4153,4154,4156,4157,4158,4159,4160,4161,4162,4164,4165,4166,4167,4170,
							4172,4173,4175,4176,4177,4178,4180,4181,4182,4184,4185,4186,4187,4188,4189,4190,4191,4192,4193,4194,4195,4196,
							4199,4200,4201,4202,4204,4205,4206,4208,4209,4210,4212,4213,4214,4215,4216,4217,4218,4219,4220,4221,4222,4223,
							4224,4225,4226,4227,4228,4229,4230,4231,4232,4233,4234,4235,4237,4238,4239,4240,4242,4243,4244,4245,4246,4247,
							4248,4249,4251,4252,4253,4255,4256,4257,4258,4259,4260,4261,4262,4264,4265,4267,4268,4269,4270,4271,4272,4273,
							4274,4275,4277,4278,4279,4280,4281,4282,4283,4284,4285,4286,4287,4288,4289,4290,4292,4293,4294,4295,4296,4297,
							4298,4299,4300,4301,4304,4307,4308,4309,4310,4311,4312,4313,4314,4315,4316,4319,4321,4322,4323,4325,4326,4327,
							4328,4329,4331,4332,4333,4334,4335,4336,4337,4338,4339,4340,4341,4343,4344,4345,4346,4347,4348,4349,4350,4351,
							4353,4354,4355,4356,4358,4360,4362,4366,4368,4369,4370,4371,4373,4375,4377,4378,4379,4380,4381,4382,4383,4384,
							4385,4387,4388,4389,4390,4391,4392,4393,4394,4395,4396,4397,4400,4401,4402,4404,4405,4409,4410,4411,4412,4413,
							4414,4415,4416,4417,4418,4420,4421,4422,4423,4424,4426,4427,4428,4429,4431,4432,4433,4434,4435,4436,4437,4438,
							4439,4440);
getitem .@itemID,1;
announce ""+strcharinfo(0)+" has opened an Old Card Album and got "+getitemname(.@itemID)+"",bc_yellow|bc_all;
    end;
}

 

616,Old_Card_Album,Old Card Album,2,10000,,50,,,,,0xFFFFFFFF,7,2,,,,,,{ callfunc "OCAannounce"; },{},{}

 

  • Upvote 1
Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

@Cyro I was also thinking about this one. But the thing is the rate is ignored. item_cardalbum.txt has GroupID,ItemID,Rate.

 

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

1 minute ago, Technoken said:

@Cyro I was also thinking about this one. But the thing is the rate is ignored. item_cardalbum.txt has GroupID,ItemID,Rate.

 

yes, i knew but as i tried in different way using groupid to announce it only announced "NULL" so i just made it, how ever it is random so no issues :)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  27
  • Topics Per Day:  0.01
  • Content Count:  505
  • Reputation:   126
  • Joined:  04/04/16
  • Last Seen:  

1 minute ago, Cyro said:

yes, i knew but as i tried in different way using groupid to announce it only announced "NULL" so i just made it, how ever it is random so no issues :)

That's right. If rate isn't an issue at all. That would be good to go. :)

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  8
  • Topics Per Day:  0.00
  • Content Count:  1137
  • Reputation:   290
  • Joined:  04/29/13
  • Last Seen:  

Just now, Technoken said:

That's right. If rate isn't an issue at all. That would be good to go. :)

i dont think it would an issue since it is random, i will try to fix rate thing if possible

Link to comment
Share on other sites

  • 0

  • Group:  Members
  • Topic Count:  104
  • Topics Per Day:  0.03
  • Content Count:  290
  • Reputation:   3
  • Joined:  09/29/13
  • Last Seen:  

can you please try to include the rates? Thanks

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...