Sallycantdance Posted August 8, 2023 Posted August 8, 2023 hello is there any script that need to register the streamer so that they can claim daily reward or daily supply or giveaways for their viewers Quote
0 Winterfox Posted August 8, 2023 Posted August 8, 2023 You could create a registration function to register a streamer via @command which sets an account variable that you can check for in another npc. A small example: - script STREAMER_SUPPLY FAKE_NPC,{ OnInit: bindatcmd("registerStreamer", strnpcinfo(3) + "::OnRegisterStreamer", 99); bindatcmd("unregisterStreamer", strnpcinfo(3) + "::OnUnregisterStreamer", 99); end; OnRegisterStreamer: OnUnregisterStreamer: if(.@atcmd_numparameters < 1) dispbottom("Usage: " + .@atcmd_command$ + " <charname>"); .@switch = (.@atcmd_command$ == "@registerStreamer") ? 1 : 0; charcommand("#set " + .@atcmd_parameters$[0] + " #STREAMER " + .@switch); } prontera,124,201,1 script Streamer Supplies 726,{ mes "[ Streamer Supplies ]"; mes "You are " + ((#STREAMER == 0) ? "no" : "an") + " Streamer!"; close; } @registerStreamer <charname> to register an account as streamer and @unregisterStreamer <charname> to unregister an account as streamer. 1 Quote
0 Rynbef Posted August 8, 2023 Posted August 8, 2023 U can create a group with normal players permissions inherit and just give a streamer this group. On npc side u can just check for group id. Rynbef~ 1 Quote
0 Sallycantdance Posted August 9, 2023 Author Posted August 9, 2023 On 8/8/2023 at 7:12 PM, Winterfox said: You could create a registration function to register a streamer via @command which sets an account variable that you can check for in another npc. A small example: - script STREAMER_SUPPLY FAKE_NPC,{ OnInit: bindatcmd("registerStreamer", strnpcinfo(3) + "::OnRegisterStreamer", 99); bindatcmd("unregisterStreamer", strnpcinfo(3) + "::OnUnregisterStreamer", 99); end; OnRegisterStreamer: OnUnregisterStreamer: if(.@atcmd_numparameters < 1) dispbottom("Usage: " + .@atcmd_command$ + " <charname>"); .@switch = (.@atcmd_command$ == "@registerStreamer") ? 1 : 0; charcommand("#set " + .@atcmd_parameters$[0] + " #STREAMER " + .@switch); } prontera,124,201,1 script Streamer Supplies 726,{ mes "[ Streamer Supplies ]"; mes "You are " + ((#STREAMER == 0) ? "no" : "an") + " Streamer!"; close; } @registerStreamer <charname> to register an account as streamer and @unregisterStreamer <charname> to unregister an account as streamer. thank you for this Quote
0 Sallycantdance Posted August 9, 2023 Author Posted August 9, 2023 15 hours ago, Rynbef said: U can create a group with normal players permissions inherit and just give a streamer this group. On npc side u can just check for group id. Rynbef~ thank you for the idea too Quote
Question
Sallycantdance
hello is there any script that need to register the streamer so that they can claim daily reward or daily supply or giveaways for their viewers
4 answers to this question
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.